Merge pull request #147 from Bruno-DaSilva/master
Add unlocks to error cases in handlers::handlePublish()
This commit is contained in:
commit
b3b9255ea0
|
@ -363,16 +363,19 @@ func handlePublish(conn *rtmp.Conn) {
|
||||||
|
|
||||||
if len(urlParts) > 2 {
|
if len(urlParts) > 2 {
|
||||||
common.LogErrorln("Extra garbage after stream key")
|
common.LogErrorln("Extra garbage after stream key")
|
||||||
|
l.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(urlParts) != 2 {
|
if len(urlParts) != 2 {
|
||||||
common.LogErrorln("Missing stream key")
|
common.LogErrorln("Missing stream key")
|
||||||
|
l.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if urlParts[1] != settings.GetStreamKey() {
|
if urlParts[1] != settings.GetStreamKey() {
|
||||||
common.LogErrorln("Stream key is incorrect. Denying stream.")
|
common.LogErrorln("Stream key is incorrect. Denying stream.")
|
||||||
|
l.Unlock()
|
||||||
return //If key not match, deny stream
|
return //If key not match, deny stream
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue