Skip to content
Snippets Groups Projects
Commit f49f8d25 authored by 3manifold's avatar 3manifold
Browse files

Fix hanging client on KeyboardInterrupt

parent 725184a8
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,8 @@ def listen_and_play( ...@@ -113,6 +113,8 @@ def listen_and_play(
finally: finally:
stop_event.set() stop_event.set()
# Given that socket::recv is blocking in receive_data_chunk, shut it down to allow the thread to continue.
recv_socket.shutdown(socket.SHUT_RDWR)
recv_thread.join() recv_thread.join()
send_thread.join() send_thread.join()
send_socket.close() send_socket.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment