projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da13bb4
)
10467: Fix panic: cannot call CloseNotify() after ServeHTTP finishes.
author
Tom Clegg <tom@curoverse.com>
Sun, 6 Nov 2016 23:47:53 +0000
(18:47 -0500)
committer
Tom Clegg <tom@curoverse.com>
Mon, 7 Nov 2016 15:43:01 +0000
(10:43 -0500)
services/keepstore/handlers.go
patch
|
blob
|
history
diff --git
a/services/keepstore/handlers.go
b/services/keepstore/handlers.go
index 5dc68df4aa1e3c5491de769664dc65b53b2e8ffe..69807d9e62117ee62981b9430924affde9a5a355 100644
(file)
--- a/
services/keepstore/handlers.go
+++ b/
services/keepstore/handlers.go
@@
-120,10
+120,10
@@
func contextForResponse(parent context.Context, resp http.ResponseWriter) contex
return parent
}
ctx, cancel := context.WithCancel(parent)
- go func() {
- <-c
n.CloseNotify()
+ go func(
c <-chan bool
) {
+ <-c
cancel()
- }()
+ }(
cn.CloseNotify()
)
return ctx
}