diff options
-rw-r--r-- | src/task_proto.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/task_proto.cc b/src/task_proto.cc index ced0552..d273344 100644 --- a/src/task_proto.cc +++ b/src/task_proto.cc @@ -75,7 +75,7 @@ static void dump_handshake_info(struct lws_tokens *lwst) } } -std::map<struct libwebsocket *, std::queue<std::string> > msgqueue; +static std::map<struct libwebsocket *, std::queue<std::string> > msgqueue; int callback_lws_task(struct libwebsocket_context * context, struct libwebsocket *wsi, @@ -93,6 +93,7 @@ int callback_lws_task(struct libwebsocket_context * context, fprintf(stderr, "callback_lws_task: LWS_CALLBACK_ESTABLISHED\n"); // pss->ringbuffer_tail = ringbuffer_head; pss->wsi = wsi; + /* // send all current tasks // char buf[512]; @@ -115,6 +116,7 @@ int callback_lws_task(struct libwebsocket_context * context, msgqueue[wsi].push(msg); libwebsocket_callback_on_writable(context, wsi); + */ } break; @@ -123,6 +125,7 @@ int callback_lws_task(struct libwebsocket_context * context, printf("Closing connection\n"); msgqueue.erase(wsi); } + break; case LWS_CALLBACK_SERVER_WRITEABLE: { |