Tentative fix for websocket timeout
This commit is contained in:
parent
463540be75
commit
0a071a2285
|
@ -50,7 +50,14 @@ func (h *livenessHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
<-ticker.C
|
||||
timer := time.NewTimer(livenessTimeout)
|
||||
select {
|
||||
case <-timer.C:
|
||||
case <-r.Context().Done():
|
||||
h.logger.Warn(map[string]any{
|
||||
"msg": "Liveness context canceled",
|
||||
"context": "ws",
|
||||
"err": r.Context().Err(),
|
||||
})
|
||||
return
|
||||
case <-ticker.C:
|
||||
h.logger.Warn(map[string]any{
|
||||
"msg": "Liveness request timed out",
|
||||
"context": "ws",
|
||||
|
|
Loading…
Reference in New Issue
Block a user