Improve websocket keepalive mechanism
Improve websocket keepalive mechanism

The previous implementation had a bug that lead to pings only being sent
on idle.

la5nta/pat,la5nta/pat,la5nta/pat,la5nta/pat