twosigma/beaker-notebook — pull request #950 by grin (2014-12-04 21:01:29+00:00)
Title: [bunsen] Reconnect evaluators after Beaker client has reconnected to the server

Steps to reproduce the reconnection issue in Bunsen:

* Open a notebook and create a python cell.
* Execute the cell and the correct response comes back.
* Turn off your WiFi.
* Wait about 30 sec-1 min until "reconnecting" is displayed at the top of the notebook.
* Turn on your WiFi.
* Wait until the "reconnecting" message disappears.
* Execute the single cell.
* A result is never returned -- the cell execution counter keeps counting.

This fix is implemented on the Bunsen branch but if it turns out to be correct it should also make sense to cherry-pick it to master.

The issue was that upon client disconnect iPython evaluators were being disconnected from the shell/stdin channels due to:
* https://github.com/twosigma/beaker-notebook/blob/bunsen/plugin/ipythonPlugins/src/dist/vendor/ipython2/kernel.js#L186
* https://github.com/twosigma/beaker-notebook/blob/bunsen/plugin/ipythonPlugins/src/dist/vendor/ipython2/kernel.js#L192

but never reconnected back. I haven't tested other evaluators yet.

@scottdraves @anglee Could you please have a look at the fix? Thanks.