This commit is contained in:
2021-04-01 11:43:24 +08:00
parent 5fc9d5c61d
commit 2ac138182b
3 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ class OnPacket extends Callback
$dispatch = $node->dispatch();
if (!is_string($dispatch)) $dispatch = Json::encode($dispatch);
if (empty($dispatch)) {
return true;
$dispatch = Json::encode(['state' => 0, 'message' => 'ok']);
}
return $server->sendto($host, $port, $dispatch);
} catch (\Throwable $exception) {