walkor il y a 2 ans
Parent
commit
956a5d89b5
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      src/Connection/TcpConnection.php
  2. 2 2
      src/Protocols/Http.php

+ 1 - 1
src/Connection/TcpConnection.php

@@ -723,7 +723,7 @@ class TcpConnection extends ConnectionInterface implements \JsonSerializable
                 }
             }
             if ($this->_status === self::STATUS_CLOSING) {
-                if ($this->__streamSending) {
+                if ($this->context->streamSending) {
                     return true;
                 }
                 $this->destroy();

+ 2 - 2
src/Protocols/Http.php

@@ -249,7 +249,7 @@ class Http
     protected static function sendStream(TcpConnection $connection, $handler, $offset = 0, $length = 0)
     {
         $connection->bufferFull = false;
-        $connection->__streamSending = true;
+        $connection->context->streamSending = true;
         if ($offset !== 0) {
             \fseek($handler, $offset);
         }
@@ -276,7 +276,7 @@ class Http
                 if ($buffer === '' || $buffer === false) {
                     fclose($handler);
                     $connection->onBufferDrain = null;
-                    $connection->__streamSending = false;
+                    $connection->context->streamSending = false;
                     return;
                 }
                 $connection->send($buffer, true);