Commit ca3d9e01 by pye52

现在初次链接服务器时会发出CONNECTING的状态通知了

parent 0f8da2ec
...@@ -76,6 +76,7 @@ public class SCWebSocketClient extends WebSocketClient { ...@@ -76,6 +76,7 @@ public class SCWebSocketClient extends WebSocketClient {
forceStop = false; forceStop = false;
SCTaskExecutor.getInstance().executeOnDiskIO(() -> { SCTaskExecutor.getInstance().executeOnDiskIO(() -> {
try { try {
connectState.postValue(new ConnectState(ConnectState.CONNECTING));
boolean connectResult = connectBlocking(10, TimeUnit.SECONDS); boolean connectResult = connectBlocking(10, TimeUnit.SECONDS);
if (connectResult) { if (connectResult) {
connectState.postValue(new ConnectState(ConnectState.CONNECTED, host.toString())); connectState.postValue(new ConnectState(ConnectState.CONNECTED, host.toString()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment