[Medusa-dev] EPIPE on asyncore.recv()
David Buscher
dfb at mrao.cam.ac.uk
Mon Jun 23 17:20:07 EDT 2003
I found that running an asynchat server under Linux, I can get a EPIPE
socket exception on the server in asyncore.recv() when I have an
ill-behaved client. Apparently what the client has to do to cause this is
to close the socket while there is still some data sent by the server that
it has not read (is this a well-known Linux sockets behaviour?).
This causes problems because, although the exception is caught in
handle_except(), the handle_close() method is not called and so I cannot
tidy up the channel object. I am thinking of modifying asyncore.recv()
to handle EPIPE in the same way as ECONNRESET, ENOTCONN and ESHUTDOWN
are currently handled.
My only worry is that no-one else has seen this problem and/or made this
fix before. Am I misdiagnosing an error or handling it in the wrong place?
Any comments welcomed.
thanks
David
--------------------------------------+----------------------------------
Cavendish Laboratory | Phone +44 1223 337302
Madingley Road | Fax +44 1223 354599
Cambridge CB3 0HE, UK | http://www.mrao.cam.ac.uk/~dfb
--------------------------------------+----------------------------------
More information about the Medusa-dev
mailing list