mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
flush outgoing heartbeats
Prevents mismatch between heartbeat timer and actual heartbeat send/recv events. Applied in notebook and parallel.
This commit is contained in:
parent
0051df30f3
commit
370078020f
@ -481,6 +481,8 @@ class IOPubHandler(AuthenticatedZMQStreamHandler):
|
||||
if self._kernel_alive:
|
||||
self._kernel_alive = False
|
||||
self.hb_stream.send(b'ping')
|
||||
# flush stream to force immediate socket send
|
||||
self.hb_stream.flush()
|
||||
else:
|
||||
try:
|
||||
callback()
|
||||
|
Loading…
Reference in New Issue
Block a user