Guido van Rossum  committed 327f8ac

Turns out that calling close() in __del__() is wrong: when the

caller uses makefile() and releases the socket object itself,

the underlying socket and streams should *not* be closed, as

they are still in use by the file object returned by makefile().

  • Participants
  • Parent commits fc5e113
  • Branches default

Comments (0)

Files changed (1)

File Lib/

 	    raise IOError, "both istream and ostream have been shut down"
-    def __del__(self):
-	self.close()
     def shutdown(self, how):
 	assert how in (0, 1, 2)
 	assert self.sock