Add keep-alive pings and tweak reconnection settings