mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-07 08:45:06 +00:00
System - server reconnecting !
This commit is contained in:
@@ -434,12 +434,13 @@ namespace PepperDash.Essentials
|
||||
if (WSClient == null)
|
||||
{
|
||||
WSClient = new WebSocketClient();
|
||||
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
||||
WSClient.Connect();
|
||||
Debug.Console(0, this, "Websocket connected");
|
||||
WSClient.ReceiveCallBack = WebsocketReceive;
|
||||
WSClient.ReceiveAsync();
|
||||
}
|
||||
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
||||
WSClient.Connect();
|
||||
Debug.Console(0, this, "Websocket connected");
|
||||
WSClient.ReceiveCallBack = WebsocketReceive;
|
||||
WSClient.ReceiveAsync();
|
||||
|
||||
|
||||
|
||||
//// **********************************
|
||||
@@ -497,7 +498,8 @@ namespace PepperDash.Essentials
|
||||
WebSocketClient.WEBSOCKET_RESULT_CODES err)
|
||||
{
|
||||
var rx = System.Text.Encoding.UTF8.GetString(data, 0, (int)length);
|
||||
ParseStreamRx(rx);
|
||||
if(rx.Length > 0)
|
||||
ParseStreamRx(rx);
|
||||
WSClient.ReceiveAsync();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user