Sjoerd Mullender wrote: > On 2008-05-07 13:37, Amaury Forgeot d'Arc wrote: > > 2008/5/7 Sjoerd Mullender <[EMAIL PROTECTED]>: > >> I would expect that a system call is done to actually close the > >> socket and free the file descriptor. But that does not happen. > > > > It does close the socket: > > > > In socket.py, when self._sock is replaced, its __del__ method will be > > called. > > I have to question the design of this. When I close() an object I > expect it to be closed there and then and not at some indeterminate > later time (well, it is determinate when you're fully aware of all > references, but often you aren't--trust me, I understand reference > counting).
Even if you're fully aware of all references, it's indeterminate in multithreaded apps. I've just taken to doing: self.socket._sock.close() self.socket.close() ...in order to send the FIN I wanted ASAP. Robert Brewer [EMAIL PROTECTED] _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com