Guard against missing status messages when requesting kernel info

This commit is contained in:
Nathaniel Nicandro 2019-05-12 23:18:19 -05:00
parent 18f108f144
commit d8e3408856

View file

@ -701,6 +701,15 @@ are taken:
(unwind-protect
(jupyter--run-handler-maybe client channel req msg)
(when (or (jupyter-message-status-idle-p msg)
;; Jupyter protocol 5.1, IPython implementation 7.5.0
;; doesn't give status: busy or status: idle messages on
;; kernel-info-requests. Whereas IPython implementation
;; 6.5.0 does. Seen on Appveyor tests.
;;
;; TODO: May be related jupyter/notebook#3705 as the
;; problem does happen after a kernel restart when
;; testing.
(eq (jupyter-message-type msg) :kernel-info-reply)
;; No idle message is received after a shutdown reply so
;; consider REQ as having received an idle message in
;; this case.