Skip to content

Commit ac5acc2

Browse files
committedNov 28, 2015
quick hack to prevent indefinite buildup of closenotify routines
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent e04a31d commit ac5acc2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎commands/http/handler.go

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
152152
if cn, ok := w.(http.CloseNotifier); ok {
153153
go func() {
154154
select {
155+
case <-time.After(time.Minute * 30):
156+
// TODO: this is a hack to avoid these goroutines building up in memory
157+
log.Warning("TODO: close notify needs to be fixed")
155158
case <-cn.CloseNotify():
156159
case <-ctx.Done():
157160
}

0 commit comments

Comments
 (0)
Please sign in to comment.