mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix numeric underflow on calculating window size adjustment
This commit is contained in:
parent
cfb26629bf
commit
09e8bbea03
@ -716,7 +716,7 @@ void Channel::UpdateTimers(float dtime,bool legacy_peer)
|
|||||||
packet_too_late = current_packet_too_late;
|
packet_too_late = current_packet_too_late;
|
||||||
packets_successfull = current_packet_successfull;
|
packets_successfull = current_packet_successfull;
|
||||||
|
|
||||||
if (current_bytes_transfered > (window_size*512/2))
|
if (current_bytes_transfered > (unsigned int) (window_size*512/2))
|
||||||
{
|
{
|
||||||
reasonable_amount_of_data_transmitted = true;
|
reasonable_amount_of_data_transmitted = true;
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ public:
|
|||||||
void setWindowSize(unsigned int size) { window_size = size; };
|
void setWindowSize(unsigned int size) { window_size = size; };
|
||||||
private:
|
private:
|
||||||
JMutex m_internal_mutex;
|
JMutex m_internal_mutex;
|
||||||
unsigned int window_size;
|
int window_size;
|
||||||
|
|
||||||
u16 next_incoming_seqnum;
|
u16 next_incoming_seqnum;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user