adding reconnect code to ariavata-server