Graceful shutdown blocks on running proxy handler connections (#2789)

This commit is contained in:
Todd authored and GitHub committed 2023-01-17 08:54:01 -08:00
1 parent a437bdae0a
commit bc409bc7d4
9 files changed
+129 -28

No files matched your search

+2
View File
@@ -48,10 +48,12 @@ func (w *Worker) handler(props HandlerProperties, sm session.Manager) (http.Hand
// Create the muxer to handle the actual endpoints
mux := http.NewServeMux()
var h http.Handler
h, err := w.handleProxy(props.ListenerConfig, sm)
if err != nil {
return nil, fmt.Errorf("%s: %w", op, err)
}
h = proxyHandlers.ProxyHandlerCounter(h)
mux.Handle("/v1/proxy", metric.InstrumentWebsocketWrapper(h))
genericWrappedHandler := w.wrapGenericHandler(mux, props)