RiptideNetworking / Riptide

Lightweight C# networking solution for multiplayer games.
https://riptide.tomweiland.net
MIT License
1.04k stars 141 forks source link

Add error log on attempt to connect using non-empty message #113

Closed Warlander closed 9 months ago

Warlander commented 9 months ago

Just small change adding an error log - I think extra explanation what happens and what should be done when trying to connect with non-empty message (for example made using Message.Create(MessageSendMode.Reliable, 0) instead of Message.Create()) could be useful to save other programmers some debugging.

I've noticed this issue being mentioned previously in the past: https://github.com/RiptideNetworking/Riptide/issues/65

tom-weiland commented 9 months ago

This is a good idea, but I think the message can be clarified/simplified, the check can just be if (message.ReadLength != 0), and this error should be logged in a few other places as well.