summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-09-01 13:24:19 +0000
committerJan Kneschke <jan@kneschke.de>2005-09-01 13:24:19 +0000
commitcdd1f9547bc08d4bebfa9f059f348eaaf4a7eacb (patch)
treecaa5726cc344a75de06b9ec05ae2c2ff76c45504
parenta732e8474826bfce9ce93f693ee81e7d54b75cd9 (diff)
downloadlighttpd1.4-cdd1f9547bc08d4bebfa9f059f348eaaf4a7eacb.tar.gz
lighttpd1.4-cdd1f9547bc08d4bebfa9f059f348eaaf4a7eacb.zip
a simple connect() on the port is better and fasterlighttpd-1.4.3
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@674 152afb58-edef-0310-8abb-c4023f1b3aa9
-rwxr-xr-xtests/LightyTest.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm
index 97e138e5..cd3fae48 100755
--- a/tests/LightyTest.pm
+++ b/tests/LightyTest.pm
@@ -40,15 +40,16 @@ sub new {
sub listening_on {
my $self = shift;
- my $prog = shift;
+ my $port = shift;
- open F, "netstat -an | grep :1026|" or return 0;
-
- my $foo = <F>;
+ my $remote =
+ IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => "127.0.0.1",
+ PeerPort => $port) or return 0;
- close F;
+ close $remote;
- return (defined $foo ? 1 : 0);
+ return 1;
}
sub stop_proc {