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

Commit

Permalink
Merge pull request #1113 from pavelsmolensky/master
Browse files Browse the repository at this point in the history
Prevent unwanted timeout function call
  • Loading branch information
vania-pooh authored Sep 6, 2021
2 parents 009e498 + 027b183 commit f601da3
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 @@ -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)
})
Expand Down

0 comments on commit f601da3

Please sign in to comment.