auto reconnect if network is lost