homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ajaksu2, chris.mahan, giampaolo.rodola, vstinner
Date 2009年01月05日.22:40:30
SpamBayes Score 0.03632732
Marked as misclassified No
Message-id <1231195231.53.0.850566480696.issue4791@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
Date User Action Args
2009年01月05日 22:40:31vstinnersetrecipients: + vstinner, giampaolo.rodola, ajaksu2, chris.mahan
2009年01月05日 22:40:31vstinnersetmessageid: <1231195231.53.0.850566480696.issue4791@psf.upfronthosting.co.za>
2009年01月05日 22:40:30vstinnerlinkissue4791 messages
2009年01月05日 22:40:30vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /