about summary refs log tree commit homepage
path: root/t/www_listing.t
diff options
context:
space:
mode:
Diffstat (limited to 't/www_listing.t')
-rw-r--r--t/www_listing.t9
1 files changed, 1 insertions, 8 deletions
diff --git a/t/www_listing.t b/t/www_listing.t
index e5b797db..a5d81f38 100644
--- a/t/www_listing.t
+++ b/t/www_listing.t
@@ -73,14 +73,7 @@ SKIP: {
         my $v2 = "$tmpdir/v2";
         my $httpd = 'blib/script/public-inbox-httpd';
         use IO::Socket::INET;
-        my %opts = (
-                LocalAddr => '127.0.0.1',
-                ReuseAddr => 1,
-                Proto => 'tcp',
-                Type => SOCK_STREAM,
-                Listen => 1024,
-        );
-        my $sock = IO::Socket::INET->new(%opts);
+        my $sock = tcp_server();
         ok($sock, 'sock created');
         my ($host, $port) = ($sock->sockhost, $sock->sockport);
         my @clone = qw(git clone -q -s --bare);