From 4cedc1e84ee174cebaa59295690cfd5c6f10a0b7 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Thu, 2 Jan 2003 03:07:48 +0000 Subject: [PATCH] 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. --- Lib/SocketServer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index 4437581dca..270f4cd69d 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -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() -- 2.40.0