zorchenhimer / MovieNight

Single instance video streaming server with integrated chat.

Home Page:https://discord.gg/F2VSgjJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server freezes when incorrect stream key used

Bruno-DaSilva opened this issue · comments

It seems when someone includes a bad stream key the whole app freezes and needs to be restarted.

I think this might be related to the lack of unlock before return on https://github.com/zorchenhimer/MovieNight/blob/master/handlers.go#L376.

Is it safe to add a l.Unlock() before this return? Not sure if there's some side effects of simply returning to deny a stream.

Confirmed that the patch errors with incorrect stream keys while no longer freezing the app. I'm assuming it works for the other error cases there as well.

commented

Should be all set now.