> The other thing that occurs to me is that maybe we shouldn't be twiddling the timeout in the disconnected state as we're not idling

Do you mean the fact that the timer is set in `buffer`, which is called by `disconnected` before reconnecting? It does kind of seem that decoupling setting the timer from receiving new messages could lead to subtle bugs.