mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 04:16:25 +08:00
Fix 509 return code if non-existing stream is requested
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user