update to build 406 version

This commit is contained in:
jerry
2021-04-06 01:19:56 +08:00
parent 60619dbffc
commit c2d3b5f92a
28 changed files with 207 additions and 83 deletions

View File

@@ -28,9 +28,9 @@ class OnClose implements SwooleEvent
/** @noinspection PhpUnreachableStatementInspection */
public function onCall($server, $fd) {
unset(Context::$context[Co::getCid()]);
Console::debug("Calling Swoole \"close\" event from fd=" . $fd);
$conn = ManagerGM::get($fd);
if ($conn === null) return;
Console::debug("Calling Swoole \"close\" event from fd=" . $fd);
set_coroutine_params(["server" => $server, "connection" => $conn, "fd" => $fd]);
$dispatcher1 = new EventDispatcher(OnCloseEvent::class);

View File

@@ -59,7 +59,7 @@ class OnWorkerStart implements SwooleEvent
try {
register_shutdown_function(function () use ($server) {
$error = error_get_last();
if ($error["type"] != 0) {
if (($error["type"] ?? -1) != 0) {
Console::error("Internal fatal error: " . $error["message"] . " at " . $error["file"] . "({$error["line"]})");
}
//DataProvider::saveBuffer();