mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
bugfix: cast empty group
This commit is contained in:
@@ -178,7 +178,9 @@ end
|
||||
|
||||
function skynet.cast(group, typename, ...)
|
||||
local p = proto[typename]
|
||||
return c.send(".cast", p.id, 0, mc(group, p.pack(...)))
|
||||
if #group > 0 then
|
||||
return c.send(".cast", p.id, 0, mc(group, p.pack(...)))
|
||||
end
|
||||
end
|
||||
|
||||
skynet.genid = assert(c.genid)
|
||||
|
||||
@@ -216,6 +216,8 @@ void
|
||||
skynet_multicast_cast(struct skynet_context * from, struct skynet_multicast_message *msg, const uint32_t *dests, int n) {
|
||||
uint32_t source = skynet_context_handle(from);
|
||||
skynet_multicast_copy(msg, n);
|
||||
if (n == 0)
|
||||
return;
|
||||
int i;
|
||||
int release = 0;
|
||||
for (i=0;i<n;i++) {
|
||||
|
||||
Reference in New Issue
Block a user