implement ping pong negotiation to prevent disconnections