You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "222twotwotwo (via GitHub)" <gi...@apache.org> on 2026/07/19 14:50:32 UTC
[PR] Fix nil listener callback [dubbo-getty]
222twotwotwo opened a new pull request, #137:
URL: https://github.com/apache/dubbo-getty/pull/137
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
- fix the nil listener guard in `handlePackage` error cleanup by requiring both session and listener before calling `OnError`
- guard `OnClose` when the listener is nil so the same cleanup path does not panic one line later
- add a regression test for the nil-listener error cleanup path
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #132
**Special notes for your reviewer**:
The cleanup path used `s != nil || s.listener != nil`, so a non-nil session with a nil listener still attempted to call `s.listener.OnError(...)` and could panic while handling an existing read/decode error.
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
NONE
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix nil listener callback [dubbo-getty]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on PR #137:
URL: https://github.com/apache/dubbo-getty/pull/137#issuecomment-5018039596
这个问题,给上游 alexstocks/getty 也来个 PR @222twotwotwo
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix nil listener callback [dubbo-getty]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #137:
URL: https://github.com/apache/dubbo-getty/pull/137
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix nil listener callback [dubbo-getty]
Posted by "222twotwotwo (via GitHub)" <gi...@apache.org>.
222twotwotwo commented on PR #137:
URL: https://github.com/apache/dubbo-getty/pull/137#issuecomment-5042550289
> 这个问题,给上游 alexstocks/getty 也来个 PR @222twotwotwo
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org