diff --git a/src/core/netevent.c b/src/core/netevent.c index 21ceee5..af343a0 100644 --- a/src/core/netevent.c +++ b/src/core/netevent.c @@ -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 diff --git a/src/core/route.c b/src/core/route.c index bbaa1c7..cc17301 100644 --- a/src/core/route.c +++ b/src/core/route.c @@ -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; }