making local client auto reconnect when disconnected