More robust communication with keep-alive pings