freenet-core
freenet-core copied to clipboard
fix: connection stability improvements for production issues
Summary
- Fix graceful handling of RSA intro packets on established connections
- Make keep-alive constants consistent between debug and release builds
Fixes
- Intro packet handling: When established connections receive 256-byte RSA intro packets (e.g., when a peer tries to reestablish), we now decrypt and ACK them instead of logging decryption errors
- Keep-alive compatibility: Debug and release builds now use the same timing (10s interval, 30s timeout) to prevent premature connection drops
Root Cause
Production decryption errors after ~60 seconds were caused by:
- Debug/release keep-alive incompatibility causing legitimate timeouts
- Lack of graceful handling when peers sent intro packets to reestablish
Test plan
- [x] Integration tests pass
- [ ] Deploy to gateways and verify connection stability
- [ ] Monitor for decryption errors in production
🤖 Generated with Claude Code