Sjoerd Mullender wrote: > On 2008-05-07 13:37, Amaury Forgeot d'Arc wrote: > > 2008/5/7 Sjoerd Mullender <sjoerd at acm.org>: > >> 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 fumanchu at aminus.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4