Asyncore select statement problem

Gabriel Genellina gagsl-py at yahoo.com.ar
Thu Jan 18 10:12:52 EST 2007


"JamesHoward" <James.w.Howard at gmail.com> escribió en el mensaje 
news:1169075120.491855.103200 at q2g2000cwa.googlegroups.com...

>I have a problem with python's asyncore module throwing a bad file
> descriptor error.  The code might be difficult to copy here, but the
> problem is essentially:
>
> The server wants to sever the connection of an open Asyncore socket.
> Calling the socket.close() nor the socket.shutdown(2) calls seem to
> work.  The only way I can close the connection without creating the
> error below is to have the client close the connection.

You have to use the dispatcher's close() method, else, the asyncore map 
won't be updated, keeping a reference to the closed socket.

-- 
Gabriel Genellina 





More information about the Python-list mailing list