Browse Source

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

bel 11 years ago
parent
commit
8452297a0c
1 changed files with 3 additions and 0 deletions
  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 &&