diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-21 20:46:32 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-21 20:46:32 +0100 |
commit | 50f1b035b89ab8c4559620e12ab55cf7458fc291 (patch) | |
tree | 5d0e0e62649b0ba4282f124a22c37f614b7237d0 /core/io | |
parent | 4d052e51a203e013cc6572bba4b05661e78d270b (diff) |
Fix MultiplayerAPI crash when peer impl misbehave.
Also fix WebSocketMultiplayer::get_available_packet_count() return value
when peer is not configured to use the multiplayer API.
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/multiplayer_api.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 2708cb8c01..381ac4c0bb 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -111,6 +111,7 @@ void MultiplayerAPI::poll() { Error err = network_peer->get_packet(&packet, len); if (err != OK) { ERR_PRINT("Error getting packet!"); + break; // Something is wrong! } rpc_sender_id = sender; |