Skip to content

Commit

Permalink
Wait for kernel to be connected to send shutdown_request
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Nov 6, 2018
1 parent f6b0674 commit 76b9044
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notebook/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ def _msg_received(self, msg, channel):
def shutdown(self, now=False):
self.restarter.stop()

if now:
if now or (self.client is None):
self.manager.kill()
else:
yield self.client_connected
yield self.client.shutdown_or_terminate()

self._close_client()
Expand Down

0 comments on commit 76b9044

Please sign in to comment.