Skip to content

Shut down keep-alive timers when their buffers are killed

Peter Liljenberg requested to merge petli/lyskom-elisp-client:master into master

Having lyskom-keep-alive-timers as a buffer local variable means that a keep-alive timer can never be removed if the corresponding lyskom buffer is killed. The effect is that the message log keeps saying "ERROR!" as the timer keeps firing.

This commit changes the list to keep track of each timer by the buffer in an assoc list. The previous code theoretically allowed multiple timers per buffer, but that would be unlikely to ever happen since existing timers in the buffer were stopped before starting a new keep alive timer. So just allowing one timer per buffer should be fine.

Merge request reports