Skip to content

Commit 6815a81

Browse files
committed
update workerman to 3.1.4
1 parent afb1ebe commit 6815a81

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Workerman/Worker.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -1321,11 +1321,15 @@ public function acceptUdpConnection($socket)
13211321
$connection = new UdpConnection($socket, $remote_address);
13221322
if($this->onMessage)
13231323
{
1324-
$parser = $this->_protocol;
1324+
if($this->_protocol)
1325+
{
1326+
$parser = $this->_protocol;
1327+
$recv_buffer = $parser::decode($recv_buffer, $connection);
1328+
}
13251329
ConnectionInterface::$statistics['total_request']++;
13261330
try
13271331
{
1328-
call_user_func($this->onMessage, $connection, $parser::decode($recv_buffer, $connection));
1332+
call_user_func($this->onMessage, $connection, $recv_buffer);
13291333
}
13301334
catch(Exception $e)
13311335
{

0 commit comments

Comments
 (0)