mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
avoid dead loop
This commit is contained in:
@@ -317,8 +317,11 @@ forward_local_messsage(struct harbor *h, void *msg, int sz) {
|
|||||||
destination = (destination & HANDLE_MASK) | ((uint32_t)h->id << HANDLE_REMOTE_SHIFT);
|
destination = (destination & HANDLE_MASK) | ((uint32_t)h->id << HANDLE_REMOTE_SHIFT);
|
||||||
|
|
||||||
if (skynet_send(h->ctx, header.source, destination, type, (int)header.session, (void *)msg, sz-HEADER_COOKIE_LENGTH) < 0) {
|
if (skynet_send(h->ctx, header.source, destination, type, (int)header.session, (void *)msg, sz-HEADER_COOKIE_LENGTH) < 0) {
|
||||||
skynet_send(h->ctx, destination, header.source , PTYPE_ERROR, (int)header.session, NULL, 0);
|
if (type != PTYPE_ERROR) {
|
||||||
skynet_error(h->ctx, "Unknown destination :%x from :%x", destination, header.source);
|
// don't need report error when type is error
|
||||||
|
skynet_send(h->ctx, destination, header.source , PTYPE_ERROR, (int)header.session, NULL, 0);
|
||||||
|
}
|
||||||
|
skynet_error(h->ctx, "Unknown destination :%x from :%x type(%d)", destination, header.source, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user