Move UpdateLastRequestTime method to timeout.go and add ShouldTimeout method for idle timeout handling

This commit is contained in:
2025-08-17 20:37:20 +02:00
parent e4e7a82294
commit c734bcae4a
2 changed files with 28 additions and 9 deletions

View File

@@ -140,15 +140,6 @@ func (i *Process) Stop() error {
return nil
}
// UpdateLastRequestTime updates the last request access time for the instance via proxy
func (i *Process) UpdateLastRequestTime() {
i.mu.Lock()
defer i.mu.Unlock()
lastRequestTime := time.Now().Unix()
i.lastRequestTime.Store(lastRequestTime)
}
func (i *Process) monitorProcess() {
defer func() {
i.mu.Lock()