pollout: handle request for pollout during pollout service
[platform/upstream/libwebsockets.git] / lib / private-libwebsockets.h
index 64cfcf6..abe4671 100644 (file)
@@ -1502,7 +1502,7 @@ struct lws {
        unsigned int sending_chunked:1;
        unsigned int already_did_cce:1;
        unsigned int told_user_closed:1;
-       unsigned int :1;
+
 #if defined(LWS_WITH_ESP8266)
        unsigned int pending_send_completion:3;
        unsigned int close_is_pending_send_completion:1;
@@ -1532,6 +1532,10 @@ struct lws {
        unsigned int redirect_to_https:1;
 #endif
 
+       /* volatile to make sure code is aware other thread can change */
+       volatile unsigned int handling_pollout:1;
+       volatile unsigned int leave_pollout_active:1;
+
 #ifndef LWS_NO_CLIENT
        unsigned short c_port;
 #endif