Joanhey 2 éve
szülő
commit
975d94a909
2 módosított fájl, 4 hozzáadás és 3 törlés
  1. 2 1
      src/Connection/TcpConnection.php
  2. 2 2
      src/Events/Select.php

+ 2 - 1
src/Connection/TcpConnection.php

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

+ 2 - 2
src/Events/Select.php

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