Added reconnect logic when ping does not respond after keepAlive time out as well as corresponding unit tests that verify the change.