dubbo
dubbo copied to clipboard
Fix telnet ctrl+c issue #13812
What is the purpose of the change
fix issue #13812.
when user type 'Ctrl + C' in telnet client, telnet client will send the following sequence: FF F4 FF FD 06
to server, it can be divided into two parts:
- 'FF F4' is telnet interrupt process command.
- 'FF FD 06' is to suppress the output of the process that is to be interrupted by the interrupt process command.
We need to response with 'FF FC 06' to ignore it and tell the client continue display output.
Brief changelog
- add a
CtrlCHandler
to handle 'Ctrl + C' request - add CtrlCHandler to Netty pipeline , place it previous to
LineBasedFrameDecoder
Verifying this change
Checklist
- [x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [x] Each commit in the pull request should have a meaningful subject line and body.
- [x ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
- [ ] Add some description to dubbo-website project if you are requesting to add a feature.
- [ ] GitHub Actions works fine on your own branch.
- [ ] If this contribution is large, please follow the Software Donation Guide.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.45%. Comparing base (
0553d70
) to head (881a42e
). Report is 14 commits behind head on 3.2.
Additional details and impacted files
@@ Coverage Diff @@
## 3.2 #13921 +/- ##
==========================================
- Coverage 70.56% 70.45% -0.12%
==========================================
Files 1607 1608 +1
Lines 70071 70096 +25
Branches 10100 10105 +5
==========================================
- Hits 49449 49386 -63
- Misses 16010 16075 +65
- Partials 4612 4635 +23
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Can you pls add some test cases verify it?
I added a unit test, and tested manually:
Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
96.8% Coverage on New Code
0.0% Duplication on New Code