sockets: client dies...

Parzival Herzog parz at home.com
Thu Jan 25 13:31:05 EST 2001


It has been my experience (Python 1.5.2 and 2.0 on Win2K) that on a client,
I get an exception if the server closes the connection, but on the server
(i.e. the program that does 'bind' and 'accept',) if the client dies or
'close's
the connection, a server's 'recv' call will return an empty string, or None
(I don't remember which,) and NOT raise a socket.error when the client
 dies or 'close's the connection. This has been a problem for me,
so if anyone can shed some more light on this I would appreciate it.

- Parzival

"Rick Lee" <rwklee at home.com> wrote in message
news:3A6F8AB1.BDF23F5D at home.com...
> You should be able to tell on the recv().  It will throw an exception, not
> just return "no data".
>






More information about the Python-list mailing list