Browse Source
Merge pull request #147 from Bruno-DaSilva/master
Add unlocks to error cases in handlers::handlePublish()
pull/1/head
Nick
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
handlers.go
|
|
@ -363,16 +363,19 @@ func handlePublish(conn *rtmp.Conn) { |
|
|
|
|
|
|
|
if len(urlParts) > 2 { |
|
|
|
common.LogErrorln("Extra garbage after stream key") |
|
|
|
l.Unlock() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if len(urlParts) != 2 { |
|
|
|
common.LogErrorln("Missing stream key") |
|
|
|
l.Unlock() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if urlParts[1] != settings.GetStreamKey() { |
|
|
|
common.LogErrorln("Stream key is incorrect. Denying stream.") |
|
|
|
l.Unlock() |
|
|
|
return //If key not match, deny stream
|
|
|
|
} |
|
|
|
|
|
|
|