Problem: http.CloseNotifier is used

Solution: replace with r.Context().Done()
This commit is contained in:
Peter Stuifzand 2021-11-20 21:07:47 +01:00
parent ca9be063cf
commit 3c5a620d4f
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -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