Catch error in LiveStreams Controller to avoid concurrency issue
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user