Fix for very long messages that get dropped if they are sent alone (no other message before it) and does not fit inside one TCP packet.
(Thanks FleetCommand!)
This commit is contained in:
@@ -121,11 +121,11 @@ int handle_net_read(struct hub_user* user)
|
||||
start = pos;
|
||||
}
|
||||
|
||||
if (lastPos)
|
||||
if (lastPos || remaining)
|
||||
{
|
||||
if (remaining < g_hub->config->max_recv_buffer)
|
||||
{
|
||||
hub_recvq_set(q, lastPos, remaining);
|
||||
hub_recvq_set(q, lastPos ? lastPos : buf, remaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user