diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-10-31 14:18:22 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-11-02 15:17:23 +0100 |
commit | 33dda2e68a40888a7fd41e9a8d421873d9dc7fde (patch) | |
tree | 513953b159b1c95c751b67d33c53aae6d2d57ca1 /modules/websocket | |
parent | 9773803e4eb5f986750eb4daa726b25bb41e96e8 (diff) |
[MP] Remove connection state signals from MultiplayerPeer.
Now handled directly by the MultiplayerAPI implementation.
Diffstat (limited to 'modules/websocket')
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index 827c618e4e..14f9c0ba4d 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -264,9 +264,7 @@ void WebSocketMultiplayerPeer::_poll_client() { } } else if (peer->get_ready_state() == WebSocketPeer::STATE_CLOSED) { if (connection_status == CONNECTION_CONNECTED) { - emit_signal(SNAME("server_disconnected")); - } else { - emit_signal(SNAME("connection_failed")); + emit_signal(SNAME("peer_disconnected"), 1); } _clear(); return; @@ -276,7 +274,6 @@ void WebSocketMultiplayerPeer::_poll_client() { ERR_FAIL_COND(!pending_peers.has(1)); // Bug. if (OS::get_singleton()->get_ticks_msec() - pending_peers[1].time > handshake_timeout) { print_verbose(vformat("WebSocket handshake timed out after %.3f seconds.", handshake_timeout * 0.001)); - emit_signal(SNAME("connection_failed")); _clear(); return; } |