Handle heartbeat messages in websocket handler