From 33dda2e68a40888a7fd41e9a8d421873d9dc7fde Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 31 Oct 2022 14:18:22 +0100 Subject: [MP] Remove connection state signals from MultiplayerPeer. Now handled directly by the MultiplayerAPI implementation. --- modules/websocket/websocket_multiplayer_peer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'modules/websocket') 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; } -- cgit v1.2.3