mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
skynet.localname return nil when the name not exist
This commit is contained in:
@@ -368,8 +368,10 @@ static const char *
|
||||
cmd_query(struct skynet_context * context, const char * param) {
|
||||
if (param[0] == '.') {
|
||||
uint32_t handle = skynet_handle_findname(param+1);
|
||||
sprintf(context->result, ":%x", handle);
|
||||
return context->result;
|
||||
if (handle) {
|
||||
sprintf(context->result, ":%x", handle);
|
||||
return context->result;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user