Joanhey 2 жил өмнө
parent
commit
975d94a909

+ 2 - 1
src/Connection/TcpConnection.php

@@ -819,7 +819,8 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
         if (false === $ret) {
         if (false === $ret) {
             $this->destroy();
             $this->destroy();
             return false;
             return false;
-        } elseif (0 === $ret) {
+        }
+        if (0 === $ret) {
             // There isn't enough data and should try again.
             // There isn't enough data and should try again.
             return 0;
             return 0;
         }
         }

+ 2 - 2
src/Events/Select.php

@@ -116,7 +116,7 @@ class Select implements EventInterface
     /**
     /**
      * @var ?callable
      * @var ?callable
      */
      */
-    protected $errorHandler = null;
+    protected $errorHandler;
 
 
     /**
     /**
      * Construct.
      * Construct.
@@ -276,7 +276,7 @@ class Select implements EventInterface
             return;
             return;
         }
         }
         $this->signalEvents[$signal] = $func;
         $this->signalEvents[$signal] = $func;
-        pcntl_signal($signal, [$this, 'signalHandler']);
+        pcntl_signal($signal, $this->signalHandler(...));
     }
     }
 
 
     /**
     /**