Catch error in LiveStreams Controller to avoid concurrency issue

This commit is contained in:
Sebastian Serth
2022-11-10 12:00:50 +01:00
parent 8683128b8b
commit 60f8d9809b

View File

@ -49,9 +49,9 @@ class LiveStreamsController < ApplicationController
response.commit! response.commit!
end end
if stream.connected? begin
stream.write chunk stream.write chunk
else rescue ClientDisconnected
# The client disconnected, so we stop streaming # The client disconnected, so we stop streaming
break break
end end