This commit is contained in:
2021-03-08 18:40:42 +08:00
parent e1dd10e210
commit b2693aa005
5 changed files with 23 additions and 17 deletions
+2
View File
@@ -50,6 +50,8 @@ class OnPacket extends Callback
return $server->sendto($host, $port, $dispatch);
} catch (\Throwable $exception) {
$this->addError($exception, 'packet');
$response = Json::encode(['state' => 500, 'message' => $exception->getMessage()]);
return $server->sendto($clientInfo['address'], $clientInfo['port'], $response);