Fix 509 return code if non-existing stream is requested

This commit is contained in:
Ingo Oppermann
2023-05-26 21:24:42 +02:00
parent 4b2b6a57a1
commit 496722c88a

View File

@@ -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
resultingBitrate := currentBitrate + streamBitrate
if resultingBitrate <= 0.5 || resultingBitrate >= maxBitrate {
if resultingBitrate >= maxBitrate {
return echo.NewHTTPError(509, "Bitrate limit exceeded")
}
}