All i have the following socket code.
my $server = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $serverport, Listen => SOMAXCONN, Reuse => 1); die "can't setup server" unless $server; &writelog("$date: INFO: Server $0 started accepting clients <br>connec +tions"); while ($client = $server->accept()) { $client->autoflush(1); my $hostinfo = gethostbyaddr($client->peeraddr); my $remoteclient = $hostinfo->name; &writelog("$date: INFO: New client connection from <br> $remoteclie +nt"); while ( <$client>) { next unless /\S/; # blank line
Now when run this on my suse 9.1 kernel Linux 2.6.4-52-default
i get no issues i can telnet to the port and works fine.
when i run this on my 2.6.5-7.193-smp
I telnet localhost the port 9000 and connects i exit, perfect
when i try and telnet from another machine ie windows to the socket it connects then the program exits and stop running
.
This does not happen on my first machine.
Is there a debug i can use.
20051012 Janitored by Corion: Added code tags, formatting
2005-10-12 Retitled by Arunbear; s/Sock/Socket/
In reply to Socket connection killing program by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |