Changed _keep_alive to use websocket.Heartbeat to keep the connection alive