Browse Source

主动断开回调

dong_dl 1 year ago
parent
commit
a24efbcd50
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/proto/ProtoParser.cpp

+ 4 - 0
src/proto/ProtoParser.cpp

@@ -2037,6 +2037,10 @@ void ProtoParser::disconnectVal()
     {
         emscripten_websocket_delete(_socket);
         _socket = 0;
+        if (_onDisconnected != nullptr)
+        {
+            _onDisconnected();
+        }
     }
 }