Skip to content

Commit

Permalink
Fix eventsource timeout handling
Browse files Browse the repository at this point in the history
COUCHDB-3164
  • Loading branch information
rnewson committed Sep 27, 2016
1 parent f1d0c5d commit 297493f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chttpd_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ changes_callback(timeout, #cacc{feed = eventsource} = Acc) ->
#cacc{mochi = Resp} = Acc,
Chunk = "event: heartbeat\ndata: \n\n",
{ok, Resp1} = chttpd:send_delayed_chunk(Resp, Chunk),
{ok, {"eventsource", Resp1}};
{ok, Acc#cacc{mochi = Resp1}};
changes_callback({stop, _EndSeq}, #cacc{feed = eventsource} = Acc) ->
#cacc{mochi = Resp, buffer = Buf} = Acc,
{ok, Resp1} = chttpd:send_delayed_chunk(Resp, Buf),
Expand Down

0 comments on commit 297493f

Please sign in to comment.