From a1dcaf6711e1bfab5edb9020a6c75af6cbc32708 2011-08-15 22:06:11 From: Brian E. Granger Date: 2011-08-15 22:06:11 Subject: [PATCH] Kernel/notebook mapping is removed when a kernel dies. * Previously, when a kernel died due to an external cause, the notebook/kernel mapping was not removed, so the kernel would be resused even though it was dead. * The heartbeat now properly removes the notebook/kernel mapping. --- diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index 4d3c854..85099fb 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -175,6 +175,7 @@ class IOPubHandler(ZMQStreamHandler): self.hb_stream.on_recv(None) def kernel_died(self): + self.application.kernel_manager.delete_mapping_for_kernel(self.kernel_id) self.write_message( {'header': {'msg_type': 'status'}, 'parent_header': {},