Skip to content
Permalink
Browse files

Track return codes from zstr_sendm() and zmsg_send() in order to prop…

…agate errors through zyre_shout()
  • Loading branch information
smalls12 committed Feb 7, 2020
1 parent 729410e commit 2bffd2a5b7d174839302a3e9af21dd9f7ae82112
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/zyre.c
@@ -552,10 +552,15 @@ zyre_shout (zyre_t *self, const char *group, zmsg_t **msg_p)
assert (group);
assert (msg_p);

zstr_sendm (self->actor, "SHOUT");
zstr_sendm (self->actor, group);
zmsg_send (msg_p, self->actor);
return 0;
if (zstr_sendm (self->actor, "SHOUT") == -1) {
return -1;
}

if (zstr_sendm (self->actor, group) == -1) {
return -1;
}

return zmsg_send (msg_p, self->actor);
}


0 comments on commit 2bffd2a

Please sign in to comment.
You can’t perform that action at this time.