about summary refs log tree commit homepage
path: root/t/httpd-corner.t
diff options
context:
space:
mode:
Diffstat (limited to 't/httpd-corner.t')
-rw-r--r--t/httpd-corner.t9
1 files changed, 2 insertions, 7 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 35318b50..c72bc9c6 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -157,14 +157,9 @@ SKIP: {
 }
 
 sub conn_for {
-        my ($sock, $msg) = @_;
-        my $conn = IO::Socket::INET->new(
-                                PeerAddr => $sock->sockhost,
-                                PeerPort => $sock->sockport,
-                                Proto => 'tcp',
-                                Type => SOCK_STREAM);
+        my ($dest, $msg) = @_;
+        my $conn = tcp_connect($dest);
         ok($conn, "connected for $msg");
-        $conn->autoflush(1);
         setsockopt($conn, IPPROTO_TCP, TCP_NODELAY, 1);
         return $conn;
 }