diff options
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r-- | Lib/pydoc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 376c445..5edc770 100644 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -2297,6 +2297,10 @@ def _start_server(urlhandler, port): def stop(self): """Stop the server and this thread nicely""" self.docserver.quit = True + self.join() + # explicitly break a reference cycle: DocServer.callback + # has indirectly a reference to ServerThread. + self.docserver = None self.serving = False self.url = None |