Skip to content

Commit 746675c

Browse files
committed
Make broadcast frames use queue
1 parent 31045e6 commit 746675c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mg_rpc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ bool mg_rpc_vcallf(struct mg_rpc *c, const struct mg_str method,
769769
const struct mg_str pprefix = mg_mk_str_n(prefb.buf, prefb.len);
770770

771771
bool result = false;
772+
bool enqueue = (opts == NULL ? true : !opts->no_queue);
772773
if (opts == NULL || !opts->broadcast) {
773-
bool enqueue = (opts == NULL ? true : !opts->no_queue);
774774
result = mg_rpc_dispatch_frame(c, src, dst, id, tag, key, NULL /* ci */,
775775
enqueue, pprefix, args_jsonf, ap);
776776
} else {
@@ -780,9 +780,8 @@ bool mg_rpc_vcallf(struct mg_rpc *c, const struct mg_str method,
780780
!ci->ch->is_broadcast_enabled(ci->ch)) {
781781
continue;
782782
}
783-
result |=
784-
mg_rpc_dispatch_frame(c, src, dst, id, tag, key, ci,
785-
false /* enqueue */, pprefix, args_jsonf, ap);
783+
result |= mg_rpc_dispatch_frame(c, src, dst, id, tag, key, ci, enqueue,
784+
pprefix, args_jsonf, ap);
786785
}
787786
}
788787
mbuf_free(&prefb);

0 commit comments

Comments
 (0)