Skip to content

Commit

Permalink
Wait for authorization thread to close properly
Browse files Browse the repository at this point in the history
  • Loading branch information
soininen committed May 30, 2024
1 parent 106b313 commit 8270e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spine_engine/server/engine_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def close(self):
"""Closes the server by sending a KILL message to this thread using a PAIR socket."""
if self.auth is not None:
self.auth.stop()
time.sleep(0.2) # wait a bit until authenticator has been closed
self.auth.thread.join()
self.ctrl_msg_sender.send(b"KILL")
self.join() # Wait for the thread to finish and sockets to close
self.ctrl_msg_sender.close() # Close this in the same thread that it was created in
Expand Down

0 comments on commit 8270e5b

Please sign in to comment.