mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add message overload warning
This commit is contained in:
@@ -283,6 +283,10 @@ skynet_context_message_dispatch(struct skynet_monitor *sm, struct message_queue
|
||||
n = skynet_mq_length(q);
|
||||
n >>= weight;
|
||||
}
|
||||
int overload = skynet_mq_overload(q);
|
||||
if (overload) {
|
||||
skynet_error(ctx, "May overload, message queue length = %d", overload);
|
||||
}
|
||||
|
||||
skynet_monitor_trigger(sm, msg.source , handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user