reconnect to server at every update