From ac5acc2e0f2b1ab79172b3d2168d7a480ae6cd3d Mon Sep 17 00:00:00 2001 From: Jeromy Date: Sat, 28 Nov 2015 15:57:18 -0800 Subject: [PATCH] quick hack to prevent indefinite buildup of closenotify routines License: MIT Signed-off-by: Jeromy --- commands/http/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/http/handler.go b/commands/http/handler.go index 7dc8ecc7b965..a86ae3e922c9 100644 --- a/commands/http/handler.go +++ b/commands/http/handler.go @@ -152,6 +152,9 @@ func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if cn, ok := w.(http.CloseNotifier); ok { go func() { select { + case <-time.After(time.Minute * 30): + // TODO: this is a hack to avoid these goroutines building up in memory + log.Warning("TODO: close notify needs to be fixed") case <-cn.CloseNotify(): case <-ctx.Done(): }