Fix MessageChannel leaks (#646)

This commit is contained in:
David Zhao
2022-04-22 10:53:20 -07:00
committed by GitHub
parent 2e182afb61
commit b7d22c4f34
8 changed files with 161 additions and 117 deletions
+1
View File
@@ -189,6 +189,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// function exits when websocket terminates, it'll close the event reading off of response sink as well
defer func() {
pLogger.Infow("server closing WS connection", "connID", connId)
resSource.Close()
reqSink.Close()
close(done)
}()