Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion executorlib/standalone/interactive/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,20 @@ def shutdown(self, wait: bool = True):
input_dict={"shutdown": True, "wait": wait}
)
self._spawner.shutdown(wait=wait)
self._reset_socket()
return result

def _reset_socket(self):
"""
Reset the socket and context of the SocketInterface instance.
"""
if self._socket is not None:
self._socket.close()
if self._context is not None:
self._context.term()
self._process = None
self._socket = None
self._context = None
return result

def __del__(self):
"""
Expand Down
Loading