Skip to content

Commit f86d0af

Browse files
committed
set linger when destroying client
1 parent 7040d28 commit f86d0af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __del__(self) -> None:
127127
else:
128128
if self.log:
129129
self.log.debug("Destroying zmq context for %s", self)
130-
self.context.destroy()
130+
self.context.destroy(linger=100)
131131
try:
132132
super_del = super().__del__ # type:ignore[misc]
133133
except AttributeError:
@@ -335,7 +335,7 @@ def stop_channels(self) -> None:
335335
self.control_channel.stop()
336336

337337
if self._created_context and not self.context.closed:
338-
self.context.destroy()
338+
self.context.destroy(linger=100)
339339

340340
@property
341341
def channels_running(self) -> bool:

0 commit comments

Comments
 (0)