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
@@ -44,7 +44,7 @@ class OnReceive 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->send($fd, $dispatch);
} catch (\Throwable $exception) {