Explorar o código

Merge pull request #96 from CismonX/master

fix udp
walkor %!s(int64=9) %!d(string=hai) anos
pai
achega
fc7cb0d333
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Worker.php

+ 3 - 0
Worker.php

@@ -1553,6 +1553,9 @@ class Worker
             if ($this->protocol) {
             if ($this->protocol) {
                 $parser      = $this->protocol;
                 $parser      = $this->protocol;
                 $recv_buffer = $parser::decode($recv_buffer, $connection);
                 $recv_buffer = $parser::decode($recv_buffer, $connection);
+                // Discard bad packets.
+                if ($recv_buffer === false)
+                    return true;
             }
             }
             ConnectionInterface::$statistics['total_request']++;
             ConnectionInterface::$statistics['total_request']++;
             try {
             try {