fix: handle negative keepalive replies - #21
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesThe server now resets keepalive liveness timers only after positive replies. New tests cover negative global and channel replies. Test code also removes redundant atomic-expression parentheses. Keepalive validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change prevents negative keepalive replies from postponing transport teardown while preserving successful keepalive behavior, with regressions covering both request levels. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant connectionKeepAlive
participant sshConn
participant SSHPeer
participant ConnectionClosingCallback
connectionKeepAlive->>sshConn: SendRequest keepalive
sshConn->>SSHPeer: Send keepalive
SSHPeer-->>sshConn: Negative reply
connectionKeepAlive->>connectionKeepAlive: Keep liveness deadline
connectionKeepAlive->>ConnectionClosingCallback: Close after failure threshold
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
ok == trueanderr == nilbefore resetting server keepalive stateVerification
go test ./...git diff --checkSummary by CodeRabbit
Bug Fixes
Tests