Fix 509 return code if non-existing stream is requested
This commit is contained in:
parent
4b2b6a57a1
commit
496722c88a
1 changed files with 1 additions and 1 deletions
|
|
@ -186,7 +186,7 @@ func (h *hls) handleEgress(c echo.Context, next echo.HandlerFunc) error {
|
||||||
// Add the new session's top bitrate to the ingress top bitrate
|
// Add the new session's top bitrate to the ingress top bitrate
|
||||||
resultingBitrate := currentBitrate + streamBitrate
|
resultingBitrate := currentBitrate + streamBitrate
|
||||||
|
|
||||||
if resultingBitrate <= 0.5 || resultingBitrate >= maxBitrate {
|
if resultingBitrate >= maxBitrate {
|
||||||
return echo.NewHTTPError(509, "Bitrate limit exceeded")
|
return echo.NewHTTPError(509, "Bitrate limit exceeded")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue