diff --git a/src/calibre/srv/tests/base.py b/src/calibre/srv/tests/base.py index fe8e59c5a9..ac3016a896 100644 --- a/src/calibre/srv/tests/base.py +++ b/src/calibre/srv/tests/base.py @@ -108,6 +108,7 @@ class TestServer(Thread): def __exit__(self, *args): self.loop.stop() + self.join(self.loop.opts.shutdown_timeout) def connect(self, timeout=None): if timeout is None: