Commit a3abd1d2 authored by Victor Stinner's avatar Victor Stinner

pydoc: close the DocServer when done

parent 2b69506c
...@@ -2112,6 +2112,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>''' ...@@ -2112,6 +2112,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>'''
while not self.quit: while not self.quit:
rd, wr, ex = select.select([self.socket.fileno()], [], [], 1) rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
if rd: self.handle_request() if rd: self.handle_request()
self.server_close()
def server_activate(self): def server_activate(self):
self.base.server_activate(self) self.base.server_activate(self)
...@@ -2409,6 +2410,7 @@ def _start_server(urlhandler, port): ...@@ -2409,6 +2410,7 @@ def _start_server(urlhandler, port):
rd, wr, ex = select.select([self.socket.fileno()], [], [], 1) rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
if rd: if rd:
self.handle_request() self.handle_request()
self.server_close()
def server_activate(self): def server_activate(self):
self.base.server_activate(self) self.base.server_activate(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment