public async Task <bool> ReconnectToServer() { Error = ""; CanRetry = true; IsReconnecting = true; try { await _server.Connect(_upgrade); _connector = new Connector(_server, _client); return(true); } catch (Exception exc) { try { Error = exc.Message; if (_connector != null) { _connector.Dispose(); _connector = null; } } catch { } return(false); } }
protected async Task ConnectCore(bool upgrade) { await _server.Connect(upgrade); if (_connector != null) { _connector.Dispose(); } _connector = new Connector(_server, _client); }