You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Simplify reconnection logic and address review feedback
Changes:
- Remove transientFailureCount mechanism as TRANSIENT_FAILURE already triggers UNAVAILABLE exceptions handled by reportError()
- Remove checkChannelStateAndTriggerReconnectIfNeeded() method to simplify logic
- Rename markAsConnected() to notifyConnected() for better clarity on method responsibility
- Only reset reconnectCount in createNewChannel() after actual channel rebuild to handle half-open connections
- Remove unnecessary else branch in run() method logging
- Add documentation about minimum safe keepalive time (10 seconds) in Config.java
- Remove unused stableConnectionCount field
Key improvement: The reconnectCount will continue to accumulate even when isConnected() returns false positives, ensuring forced channel rebuild after threshold is exceeded. This solves the issue where connections could remain in half-open state for extended periods.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java
0 commit comments