Problem: http.CloseNotifier is used
Solution: replace with r.Context().Done()
This commit is contained in:
parent
ca9be063cf
commit
3c5a620d4f
|
@ -117,7 +117,7 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Listen to connection close and un-register messageChan
|
// Listen to connection close and un-register messageChan
|
||||||
notify := w.(http.CloseNotifier).CloseNotify()
|
notify := r.Context().Done()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
<-notify
|
<-notify
|
||||||
|
|
Loading…
Reference in New Issue
Block a user