222twotwotwo opened a new pull request, #133: URL: https://github.com/apache/dubbo-getty/pull/133
## Summary - 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 ## Root Cause 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. ## Validation - `license-eye header check -c .licenserc.yaml` - `gofmt -l session.go session_test.go` - `git diff --check` - `go test ./... -coverprofile=coverage.txt -covermode=atomic` - `go vet ./...` - `golangci-lint run ./... --timeout=10m` -- 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]
