summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r--src/testdir/test_channel.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index ec231e8c8..66fd48f43 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -192,3 +192,8 @@ if __name__ == "__main__":
# Main thread terminates, but the server continues running
# until server.shutdown() is called.
+ try:
+ while server_thread.isAlive():
+ server_thread.join(1)
+ except (KeyboardInterrupt, SystemExit):
+ server.shutdown()