Log dropped messages.
This commit is contained in:
parent
e6cc47070c
commit
a51e8830ce
@ -132,6 +132,7 @@ int handle_net_read(struct hub_user* user)
|
||||
{
|
||||
hub_recvq_set(q, 0, 0);
|
||||
user_flag_set(user, flag_maxbuf);
|
||||
LOG_WARN("Received message past max_recv_buffer, dropping message.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -81,10 +81,16 @@ static inline int check_send_queue(struct hub_info* hub, struct hub_user* user,
|
||||
return 1;
|
||||
|
||||
if ((user->send_queue->size + msg->length) > get_max_send_queue(hub))
|
||||
{
|
||||
LOG_WARN("send queue overflowed, message discarded.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user->send_queue->size > get_max_send_queue_soft(hub) && msg->priority < 0)
|
||||
{
|
||||
LOG_WARN("send queue soft overflowed.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user