voc / srtrelay

SRT relay server for distributing media streams to multiple clients.
MIT License
134 stars 37 forks source link

small memory leak in registerForStats() #18

Closed gourytch closed 2 years ago

gourytch commented 2 years ago

goroutine n registerForStats(...) does not finish on connection close. https://github.com/voc/srtrelay/blob/master/srt/server.go#L294-L301

solution: create cancellable context in Handle() function and pass it to the registerForStats https://github.com/voc/srtrelay/blob/master/srt/server.go#L199

iSchluff commented 2 years ago

Thanks a lot, good find