File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,9 +261,9 @@ func (l *ServerLifecycle) Run() error {
261261 l .basicAuth ,
262262 l .idleManager ,
263263 l .cableHandler ,
264- func () string { return l .configFile }, // Get current config file
264+ func () string { return l .configFile }, // Get current config file
265265 func () time.Time { return l .configLoadTime }, // Get config load time for reload detection
266- func (path string ) { l .reloadChan <- path }, // Trigger reload
266+ func (path string ) { l .reloadChan <- path }, // Trigger reload
267267 )
268268
269269 // Create HTTP server
@@ -416,9 +416,9 @@ func (l *ServerLifecycle) handleReload() {
416416 l .basicAuth ,
417417 l .idleManager ,
418418 l .cableHandler ,
419- func () string { return l .configFile }, // Get current config file
419+ func () string { return l .configFile }, // Get current config file
420420 func () time.Time { return l .configLoadTime }, // Get config load time for reload detection
421- func (path string ) { l .reloadChan <- path }, // Trigger reload
421+ func (path string ) { l .reloadChan <- path }, // Trigger reload
422422 )
423423 l .srv .Handler = newHandler
424424 }
Original file line number Diff line number Diff line change @@ -12,21 +12,21 @@ import (
1212
1313// Manager tracks active requests and handles machine idle actions
1414type Manager struct {
15- enabled bool
16- action string // "suspend" or "stop"
17- idleTimeout time.Duration
18- activeRequests int64
19- lastActivity time.Time
20- mutex sync.RWMutex
21- timer * time.Timer
22- config * config.Config
23- configFile string // Current config file path for reload_config support
24- configLoadTime time.Time // When the config was last loaded (for reload detection)
25- reloadCallback func (configPath string ) // Callback to trigger config reload
26- idleActioned bool // Track if idle action was performed
27- resuming bool // Track if resume hooks are currently running
28- resumeCond * sync.Cond // Condition variable to wait for resume completion
29- testMode bool // Prevents actual signal sending during tests
15+ enabled bool
16+ action string // "suspend" or "stop"
17+ idleTimeout time.Duration
18+ activeRequests int64
19+ lastActivity time.Time
20+ mutex sync.RWMutex
21+ timer * time.Timer
22+ config * config.Config
23+ configFile string // Current config file path for reload_config support
24+ configLoadTime time.Time // When the config was last loaded (for reload detection)
25+ reloadCallback func (configPath string ) // Callback to trigger config reload
26+ idleActioned bool // Track if idle action was performed
27+ resuming bool // Track if resume hooks are currently running
28+ resumeCond * sync.Cond // Condition variable to wait for resume completion
29+ testMode bool // Prevents actual signal sending during tests
3030}
3131
3232// NewManager creates a new idle manager
You can’t perform that action at this time.
0 commit comments