lsalzman / enet

ENet reliable UDP networking library
MIT License
2.77k stars 673 forks source link

Issue with Updating `peer->totalWaitingData` #262

Closed aiskiller closed 4 months ago

aiskiller commented 4 months ago

In the enet_peer_queue_incoming_command() function, there is an increment operation on peer->totalWaitingData corresponding to the code peer->totalWaitingData += packet->dataLength;.

Should there also be a decrement operation on peer->totalWaitingData within the enet_peer_remove_incoming_commands() function, similar to peer->totalWaitingData -= incomingCommand->packet->dataLength; to ensure accurate tracking of the total waiting data?

lsalzman commented 4 months ago

Should be fixed now.