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:
Jan Vidar Krey 2009-12-04 08:12:54 +01:00
parent 8bcdbdc061
commit 7c093dc5da
1 changed files with 2 additions and 2 deletions

View File

@ -121,11 +121,11 @@ int handle_net_read(struct hub_user* user)
start = pos; start = pos;
} }
if (lastPos) if (lastPos || remaining)
{ {
if (remaining < g_hub->config->max_recv_buffer) if (remaining < g_hub->config->max_recv_buffer)
{ {
hub_recvq_set(q, lastPos, remaining); hub_recvq_set(q, lastPos ? lastPos : buf, remaining);
} }
else else
{ {