jupyter-repl-restart-kernel: Inhibit handlers except :shutdown-reply

See https://github.com/dzop/emacs-jupyter/pull/45#discussion_r262015539.
This commit is contained in:
Nathaniel Nicandro 2019-03-04 17:02:39 -06:00
parent 81ecc0ec31
commit 764bf6f717
No known key found for this signature in database
GPG key ID: C34814B309DD06B8

View file

@ -1387,8 +1387,9 @@ the kernel `jupyter-current-client' is connected to."
(message "%s kernel..." (if shutdown "Shutting down"
"Restarting"))
(when (and (null (jupyter-wait-until-received :shutdown-reply
(jupyter-send-shutdown-request client
:restart (not shutdown))))
(let ((jupyter-inhibit-handlers '(not :shutdown-reply)))
(jupyter-send-shutdown-request client
:restart (not shutdown)))))
(not shutdown))
;; Handle the case of a restart that does not send a shutdown-reply
;;