ipython/ipython — pull request #6467 by richardeverson (2014-09-14 22:36:49+00:00)
Title: Stop websocket timeouts when kernel is suspended

A recent commit (https://github.com/ipython/ipython/commit/37c057cef08f1620c828aef89aa77a926c01be98) times out and closes websockets which haven't responded to a ping. However, if the kernel is suspended (e.g. kernel and browser are on the same laptop and the laptop hibernates) then the timeout period is easily exceeded and the websocket closed in error. This PR just checks that there has been a recent ping for when about to timeout a missing pong.

I don't know how to set up a regression test for this sort of thing, but it's been tested by suspending and resuming the kernel via a signal and by hibernating a laptop.