fix errors in rare cases when sending a message through LidgrenClient after an error packet is received (#480)
This commit is contained in:
parent
3a4ad38e05
commit
fb9ef6efda
|
@ -47,7 +47,8 @@ namespace StardewModdingAPI.Framework.Networking
|
|||
while (rawMessage.LengthBits - rawMessage.Position >= 8)
|
||||
{
|
||||
message.Read(reader);
|
||||
this.OnProcessingMessage(message, outgoing => this.sendMessage(rawMessage.SenderConnection, outgoing), () =>
|
||||
NetConnection connection = rawMessage.SenderConnection; // don't pass rawMessage into context because it gets reused
|
||||
this.OnProcessingMessage(message, outgoing => this.sendMessage(connection, outgoing), () =>
|
||||
{
|
||||
if (this.peers.ContainsLeft(message.FarmerID) && this.peers[message.FarmerID] == peer)
|
||||
this.gameServer.processIncomingMessage(message);
|
||||
|
|
Loading…
Reference in New Issue