This commit is contained in:
2021-04-01 11:28:42 +08:00
parent e56ab4a364
commit c337ad99a4
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -47,7 +47,9 @@ class OnPacket extends Callback
$dispatch = $node->dispatch();
if (!is_string($dispatch)) $dispatch = Json::encode($dispatch);
if (empty($dispatch)) {
return true;
}
return $server->sendto($host, $port, $dispatch);
} catch (\Throwable $exception) {
$this->addError($exception, 'packet');