close
Skip to content

fix: eventloop#1127

Merged
walkor merged 1 commit into
walkor:masterfrom
luoyue712:patch-2
Nov 8, 2025
Merged

fix: eventloop#1127
walkor merged 1 commit into
walkor:masterfrom
luoyue712:patch-2

Conversation

@luoyue712
Copy link
Copy Markdown
Contributor

@luoyue712 luoyue712 commented Nov 4, 2025

相关问题:https://www.workerman.net/q/14571
在并发的时候执行了销毁操作后再重连eventloop可能为null。

#0 phar:///opt/webman.phar/vendor/workerman/workerman/src/Connection/AsyncTcpConnection.php(230): Workerman\\Connection\\AsyncTcpConnection->connect()
#1 phar:///opt/webman.phar/vendor/workerman/http-client/src/Client.php(252): Workerman\\Connection\\AsyncTcpConnection->reconnect()
#2 phar:///opt/webman.phar/vendor/workerman/http-client/src/Client.php(95): Workerman\\Http\\Client->process('tcp://interface...')
#3 [internal function]: Workerman\\Http\\Client->request('http://interfac...', Array)
#4 phar:///opt/webman.phar/app/Utils/Http/MethodInterface.php(67): call_user_func_array(Array, Array)
#5 phar:///opt/webman.phar/app/Utils/Http/MethodInterface.php(40): App\\Utils\\Http\\MethodInterface->__call('request', Array)
#6 phar:///opt/webman.phar/app/Utils/Music/NetEase/NeteaseMusic.php(160): App\\Utils\\Http\\MethodInterface->get('http://interfac...', 'ids=%5B46780547...')
#7 phar:///opt/webman.phar/app/Utils/Music/NetEase/NeteaseMusic.php(187): App\\Utils\\Music\\NetEase\\NeteaseMusic->App\\Utils\\Music\\NetEase\\{closure}(Array)
#8 phar:///opt/webman.phar/app/Utils/Music/NetEase/NeteaseMusic.php(74): App\\Utils\\Music\\NetEase\\NeteaseMusic->request()
#9 phar:///opt/webman.phar/app/v2/music/controller/NeteaseController.php(38): App\\Utils\\Music\\NetEase\\NeteaseMusic->trackInfo(467805476)
#10 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(359): App\\v2\\music\\controller\\NeteaseController->index(Object(support\\Request))
#11 phar:///opt/webman.phar/vendor/linfly/annotation/src/Validate/ValidateMiddleware.php(34): Webman\\App::Webman\\{closure}(Object(support\\Request))
#12 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(352): LinFly\\Annotation\\Validate\\ValidateMiddleware->process(Object(support\\Request), Object(Closure))
#13 phar:///opt/webman.phar/app/middleware/Validator.php(28): Webman\\App::Webman\\{closure}(Object(support\\Request))
#14 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(352): app\\middleware\\Validator->process(Object(support\\Request), Object(Closure))
#15 phar:///opt/webman.phar/app/middleware/AccessControlTest.php(13): Webman\\App::Webman\\{closure}(Object(support\\Request))
#16 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(352): App\\middleware\\AccessControlTest->process(Object(support\\Request), Object(Closure))
#17 phar:///opt/webman.phar/vendor/webman/rate-limiter/src/Limiter.php(109): Webman\\App::Webman\\{closure}(Object(support\\Request))
#18 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(352): Webman\\RateLimiter\\Limiter->process(Object(support\\Request), Object(Closure))
#19 phar:///opt/webman.phar/vendor/workerman/webman-framework/src/App.php(150): Webman\\App::Webman\\{closure}(Object(support\\Request))
#20 phar:///opt/webman.phar/vendor/workerman/workerman/src/Connection/TcpConnection.php(739): Webman\\App->onMessage(Object(Workerman\\Connection\\TcpConnection), Object(support\\Request))
#21 phar:///opt/webman.phar/vendor/workerman/workerman/src/Events/Swoole.php(288): Workerman\\Connection\\TcpConnection->baseRead(Resource id #1613)
#22 [internal function]: Workerman\\Events\\Swoole->Workerman\\Events\\{closure}()
#23 {main}

@luoyue712 luoyue712 marked this pull request as draft November 4, 2025 02:18
@luoyue712 luoyue712 marked this pull request as ready for review November 4, 2025 13:25
@luoyue712 luoyue712 force-pushed the patch-2 branch 2 times, most recently from 77bc45c to e6d2de9 Compare November 4, 2025 14:28
Comment thread src/Connection/AsyncTcpConnection.php Outdated
Comment thread src/Connection/AsyncTcpConnection.php Outdated
Comment thread src/Connection/AsyncUdpConnection.php Outdated
Comment thread src/Connection/AsyncUdpConnection.php Outdated
}

// @phpstan-ignore-next-line
if (!$this->eventLoop) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, the changes have been completed.

@walkor walkor merged commit a8d944c into walkor:master Nov 8, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants