mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Make sending net messages while disconnected on client log an error.
This commit is contained in:
@@ -50,7 +50,7 @@ END TEMPLATE-->
|
||||
|
||||
### Other
|
||||
|
||||
*None yet*
|
||||
* The client now logs an error when attempting to send a network message without server connection. Previously, it would be silently dropped.
|
||||
|
||||
### Internal
|
||||
|
||||
|
||||
@@ -1106,7 +1106,10 @@ namespace Robust.Shared.Network
|
||||
|
||||
// not connected to a server, so a message cannot be sent to it.
|
||||
if (!IsConnected)
|
||||
{
|
||||
_logger.Error($"Tried to send message while not connected to a server: {message}\n{Environment.StackTrace}");
|
||||
return;
|
||||
}
|
||||
|
||||
DebugTools.Assert(_netPeers.Count == 1);
|
||||
DebugTools.Assert(_netPeers[0].Channels.Count == 1);
|
||||
|
||||
Reference in New Issue
Block a user