-
Notifications
You must be signed in to change notification settings - Fork 107
feat: add configurable IdleTimeout parameter requested by @ananthb #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add IdleTimeout configuration parameter to allow setting maximum idle time for client connections. When configured, idle clients will be automatically disconnected after the specified duration. Changes: - Add IdleTimeout field to Content struct in config/confpar/confpar.go - Pass IdleTimeout to ftpserverlib Settings in server/server.go - Update JSON schema with idle_timeout property and validation - Support Go duration format (e.g., "5m", "30s", "1h") - Default to "0s" (disabled) for backward compatibility Closes #1410 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Florent Clairambault <[email protected]>
- Fix IdleTimeout type conversion from time.Duration to int - Add error handling for HashPlaintextPasswords call - Properly handle resp.Body.Close error in defer
Code Review - PR #1519: IdleTimeout Configuration FeatureI've completed a comprehensive review of this PR that adds configurable IdleTimeout functionality. Overall, this is a solid implementation that follows good practices. Here's my detailed analysis: ✅ Strengths and Positive AspectsCode Quality & Architecture
Configuration Design
Error Handling
🔍 Technical Implementation AnalysisData Flow
Type ConversionThe conversion
|
|
hi @fclairamb thank you for this software! i wanted to bring to your attention that this feature is currently broken, thank you for your attention |
as a work-around, to fix the issue, it is possible to set the json config value to a number (instead of a string); |
pr for your consideration |
Add IdleTimeout configuration parameter to allow setting maximum idle time for client connections. When configured, idle clients will be automatically disconnected after the specified duration.
Requested by @ananthb
Changes:
Closes #1410
Generated with Claude Code