Clearing out old patch queue. Patch #558547, make SocketServer more

robust. This makes socketserver's close() method callable repeatedly
without error - similar to other file-like objects.
This commit is contained in:
Anthony Baxter 2003-01-02 03:07:48 +00:00
parent bf1b1fdb9e
commit 4cedc1e84e
1 changed files with 2 additions and 1 deletions

View File

@ -561,7 +561,8 @@ class StreamRequestHandler(BaseRequestHandler):
self.wfile = self.connection.makefile('wb', self.wbufsize)
def finish(self):
self.wfile.flush()
if not self.wfile.closed:
self.wfile.flush()
self.wfile.close()
self.rfile.close()