diff --git a/selenoid.go b/selenoid.go index eaf85c37..e625ac7b 100644 --- a/selenoid.go +++ b/selenoid.go @@ -534,6 +534,11 @@ func reverseProxy(hostFn func(sess *session.Session) string, status string) func sid, remainingPath := splitRequestPath(r.URL.Path) sess, ok := sessions.Get(sid) if ok { + select { + case <-sess.TimeoutCh: + default: + close(sess.TimeoutCh) + } sess.TimeoutCh = onTimeout(sess.Timeout, func() { request{r}.session(sid).Delete(requestId) })