Browse Source

read continue only for SSL

ithewei 3 years ago
parent
commit
568ec21183
1 changed files with 5 additions and 2 deletions
  1. 5 2
      event/nio.c

+ 5 - 2
event/nio.c

@@ -316,8 +316,11 @@ read:
     io->readbuf.tail += nread;
     __read_cb(io, buf, nread);
     if (nread == len && !io->closed) {
-        // read continue
-        goto read;
+        // NOTE: ssl may have own cache
+        if (io->io_type == HIO_TYPE_SSL) {
+            // read continue
+            goto read;
+        }
     }
     return;
 read_error: