Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Prevent unwanted timeout function call
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsmolensky committed Jun 23, 2021
1 parent e6523b6 commit 027b183
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions selenoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,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)
})
Expand Down

0 comments on commit 027b183

Please sign in to comment.