Explorar o código

Issue #8: Possible issue and possible fix in websocket handling (by celeron55)

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

+ 1 - 1
src/civetweb.c

@@ -4837,7 +4837,7 @@ static void read_websocket(struct mg_connection *conn)
                 error = 0;
                 while (len < data_len) {
                     int n = pull(NULL, conn, data + len, (int)(data_len - len));
-                    if (n < 0) {
+                    if (n <= 0) {
                         error = 1;
                         break;
                     }