Browse Source

a simple connect() on the port is better and faster

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@674 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.3 lighttpd-1.4.3
Jan Kneschke 17 years ago
parent
commit
cdd1f9547b
  1. 13
      tests/LightyTest.pm

13
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 {

Loading…
Cancel
Save