private void HandleWebSocketClientOnError(object sender, ErrorEventArgs e) { //I we get an error it could be an endpoint issue, reset the endpoint url Debug.Log("ERROR " + e.ToJSON()); //webSocketClient = null; failedConnectAttempts++; }