222twotwotwo opened a new pull request, #138: URL: https://github.com/apache/dubbo-getty/pull/138
<!-- Thanks for sending a pull request! --> **What this PR does**: This PR handles expected HTTP server shutdown errors in the WS/WSS event loops. For WSS servers, normal shutdown or listener close errors are now treated as expected close paths instead of causing a panic. Unexpected WSS `Serve` errors still keep the original behavior: they are logged and then panic. It also adds a regression test to verify that closing a WSS server does not panic during normal shutdown. **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 WSS panic behavior is preserved for unexpected `Serve` failures. This PR only excludes expected shutdown errors such as `http.ErrServerClosed`, `net.ErrClosed`, and closed listener errors. Validated with: ```bash go test ./... ``` **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 WSS server shutdown no longer panics when the underlying HTTP server or listener is closed normally. ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
