소스 검색

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

bel 11 년 전
부모
커밋
8452297a0c
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 &&