Explorar el Código

Shorten the comment on the close() check in WebSocket::read()

yhirose hace 3 días
padre
commit
3544f47edd
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      httplib.h

+ 2 - 3
httplib.h

@@ -23884,9 +23884,8 @@ inline ReadResult WebSocket::read(std::string &msg) {
       // Handle fragmentation
       if (!fin) {
         while (true) {
-          // A close() from another thread ends the message being assembled,
-          // as it ends the loop over frames above: a peer that keeps sending
-          // fragments never lets a read reach a wait
+          // As in the loop over frames above, close() ends the read even while
+          // the peer keeps sending fragments
           if (closed_) { return Fail; }
           Opcode cont_opcode;
           std::string cont_payload;