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:
parent
8bcdbdc061
commit
7c093dc5da
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user