remove dead_service table, address may reused

This commit is contained in:
Cloud Wu
2018-10-08 15:44:12 +08:00
parent 98b5c7c7c6
commit 7e57e498f6
3 changed files with 38 additions and 58 deletions

View File

@@ -703,7 +703,7 @@ skynet_send(struct skynet_context * context, uint32_t source, uint32_t destinati
if (type & PTYPE_TAG_DONTCOPY) {
skynet_free(data);
}
return -1;
return -2;
}
_filter_args(context, type, &session, (void **)&data, &sz);
@@ -753,6 +753,13 @@ skynet_sendname(struct skynet_context * context, uint32_t source, const char * a
return -1;
}
} else {
if ((sz & MESSAGE_TYPE_MASK) != sz) {
skynet_error(context, "The message to %s is too large", addr);
if (type & PTYPE_TAG_DONTCOPY) {
skynet_free(data);
}
return -2;
}
_filter_args(context, type, &session, (void **)&data, &sz);
struct remote_message * rmsg = skynet_malloc(sizeof(*rmsg));