Commit f084ad80 authored by Dmitry Frank's avatar Dmitry Frank Committed by Cesanta Bot

Fix pubsub example

CL: Mongoose Web Server: Fix publish-subscribe example

PUBLISHED_FROM=04fdb66c1d4eb56798a5be2634f9f9bb2f18f288
parent 255da78b
...@@ -36,7 +36,7 @@ static void server_handler(struct mg_connection *nc, int ev, void *p) { ...@@ -36,7 +36,7 @@ static void server_handler(struct mg_connection *nc, int ev, void *p) {
struct mg_connection *c; struct mg_connection *c;
for (c = mg_next(nc->mgr, NULL); c != NULL; c = mg_next(nc->mgr, c)) { for (c = mg_next(nc->mgr, NULL); c != NULL; c = mg_next(nc->mgr, c)) {
if (!(c->flags |= MG_F_USER_2)) continue; // Skip non-client connections if (!(c->flags & MG_F_USER_2)) continue; // Skip non-client connections
mg_send(c, io->buf, io->len); mg_send(c, io->buf, io->len);
} }
mbuf_remove(io, io->len); mbuf_remove(io, io->len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment