Socket connection not closing
| From: | Martín Marqués | Date: | Mon, 20 Apr 2009 19:09:55 +0000 |
| Subject: | Socket connection not closing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291704@lists.php.net to get a copy of this message | ||
I have a socket application written a few years ago in PHP which
receives information and does something (not relevant at the moment).
The program that connects is written in PHP with PEARs Net_Socket.
This socket is really taken from the socket example in the PHP docs.
It's been working OK for quite some time, but today I tried it out on
my development machine and I'm experiencing some problems with the
network connection not closing:
# lsof -i :9100
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
printSock 5309 root 3u IPv4 21732 0t0 TCP
bugs.unl.edu.ar:9100 (LISTEN)
printSock 5309 root 4u IPv4 26834 0t0 TCP
bugs.unl.edu.ar:9100->inti.unl.edu.ar:37825 (CLOSE_WAIT)
sh 8077 root 3u IPv4 21732 0t0 TCP
bugs.unl.edu.ar:9100 (LISTEN)
sh 8077 root 4u IPv4 26834 0t0 TCP
bugs.unl.edu.ar:9100->inti.unl.edu.ar:37825 (CLOSE_WAIT)
I sent the disconnect() from Net_Socket, and even set the connection
to not be persistent (just in case), but I can't get the connection to
close.
Any ideas on what can be wrong?
As I said before, this socket application is working OK on other machines.
--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador