Message79205
Ok, some news about this bug (I tested the ftp test account): the
problem is that the data socket is not closed when self.voidresp() is
called. I can't see close() syscall before the call to
self.voidresp(). SocketIO.close() does nothing: it does not really
close the socket, just the file. And socket.close() does also nothing
because there is still an io reference... the closed file :-/ The io
reference counter is only updated when the file is destroyed.
conn = <create a socket>
# conn._io_refs=0
fp = conn.makefile('r', encoding=self.encoding)
# conn._io_refs=1
...
fp.close() # only set fp.closed to True
conn.close() # only set conn._closed to True
# conn._io_refs=1 and the socket (file descriptor) is still open
del fp
# conn._io_refs=0 -> the socket is finally closed! |
|
| Date |
User |
Action |
Args |
| 2009-01-05 22:40:31 | vstinner | set | recipients:
+ vstinner, giampaolo.rodola, ajaksu2, chris.mahan |
| 2009-01-05 22:40:31 | vstinner | set | messageid: <[email protected]> |
| 2009-01-05 22:40:30 | vstinner | link | issue4791 messages |
| 2009-01-05 22:40:30 | vstinner | create | |
|