diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ea282f77acd..1855cd1cf27 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -2112,6 +2112,7 @@ pydoc by Ka-Ping Yee <ping@lfw.org>''' while not self.quit: rd, wr, ex = select.select([self.socket.fileno()], [], [], 1) if rd: self.handle_request() + self.server_close() def server_activate(self): self.base.server_activate(self) @@ -2409,6 +2410,7 @@ def _start_server(urlhandler, port): rd, wr, ex = select.select([self.socket.fileno()], [], [], 1) if rd: self.handle_request() + self.server_close() def server_activate(self): self.base.server_activate(self)