preemptive checks
This commit is contained in:
parent
23a33ba489
commit
c419d80b57
@ -196,7 +196,7 @@ namespace IW4MAdmin.Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we don't want to remove events that are correlated to command
|
// we don't want to remove events that are correlated to command
|
||||||
if (ProcessingEvents.Values.Count(gameEvent => gameEvent.CorrelationId == newEvent.CorrelationId) == 1)
|
if (ProcessingEvents.Values.ToList()?.Count(gameEvent => gameEvent.CorrelationId == newEvent.CorrelationId) == 1)
|
||||||
{
|
{
|
||||||
ProcessingEvents.Remove(newEvent.Id, out _);
|
ProcessingEvents.Remove(newEvent.Id, out _);
|
||||||
}
|
}
|
||||||
|
@ -435,6 +435,7 @@ namespace IW4MAdmin.Application.RCon
|
|||||||
if (bufferSpaceAvailable >= 0 )
|
if (bufferSpaceAvailable >= 0 )
|
||||||
{
|
{
|
||||||
_log.LogWarning("Not enough buffer space to store incoming data {bytesNeeded} additional bytes required", bufferSpaceAvailable);
|
_log.LogWarning("Not enough buffer space to store incoming data {bytesNeeded} additional bytes required", bufferSpaceAvailable);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.ReceiveEventArgs.SetBuffer(state.ReceiveBuffer, totalBytesTransferred, sock.Available);
|
state.ReceiveEventArgs.SetBuffer(state.ReceiveBuffer, totalBytesTransferred, sock.Available);
|
||||||
|
Loading…
Reference in New Issue
Block a user