|
|
@@ -1321,11 +1321,15 @@ class Worker
|
|
|
$connection = new UdpConnection($socket, $remote_address);
|
|
|
if($this->onMessage)
|
|
|
{
|
|
|
- $parser = $this->_protocol;
|
|
|
+ if($this->_protocol)
|
|
|
+ {
|
|
|
+ $parser = $this->_protocol;
|
|
|
+ $recv_buffer = $parser::decode($recv_buffer, $connection);
|
|
|
+ }
|
|
|
ConnectionInterface::$statistics['total_request']++;
|
|
|
try
|
|
|
{
|
|
|
- call_user_func($this->onMessage, $connection, $parser::decode($recv_buffer, $connection));
|
|
|
+ call_user_func($this->onMessage, $connection, $recv_buffer);
|
|
|
}
|
|
|
catch(Exception $e)
|
|
|
{
|