Explorar o código

Strategy of the data callback should be equivalent to the ready callback

bel %!s(int64=11) %!d(string=hai) anos
pai
achega
8452297a0c
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -4613,6 +4613,9 @@ static void read_websocket(struct mg_connection *conn)
             /* Exit the loop if callback signalled to exit,
                or "connection close" opcode received. */
             if ((conn->ctx->callbacks.websocket_data != NULL &&
+#ifdef USE_LUA
+                 (conn->lua_websocket_state == NULL) &&
+#endif
                  !conn->ctx->callbacks.websocket_data(conn, mop, data, data_len)) ||
 #ifdef USE_LUA
                 (conn->lua_websocket_state &&