Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fix changes API usage for new pending values
BugzId: 26119
  • Loading branch information
davisp authored and rnewson committed Aug 7, 2014
1 parent 3b5726f commit 1895630795efdc6091f0b5b805cd630e442493bf
Showing 1 changed file with 6 additions and 0 deletions.
@@ -100,6 +100,9 @@ changes_callback({change, Change0}, #acc{feed="continuous"}=Acc) ->
{ok, Acc#acc{resp=Resp1, last_data_sent_time=os:timestamp()}}
end;
changes_callback({stop, EndSeq}, #acc{feed="continuous"}=Acc) ->
% Temporary upgrade clause - Case 24236
changes_callback({stop, EndSeq, null}, Acc);
changes_callback({stop, EndSeq, _Pending}, #acc{feed="continuous"}=Acc) ->
#acc{resp=Resp} = Acc,
{ok, Resp1} = chttpd:send_delayed_chunk(Resp,
[?JSON_ENCODE({[{<<"last_seq">>, EndSeq}]}) | "\n"]),
@@ -135,6 +138,9 @@ changes_callback({change, Change0}, Acc) ->
{ok, Acc1}
end;
changes_callback({stop, EndSeq}, Acc) ->
% Temporary upgrade clause - Case 24236
changes_callback({stop, EndSeq, null}, Acc);
changes_callback({stop, EndSeq, _Pending}, Acc) ->
#acc{resp=Resp} = Acc,
{ok, Resp1} = chttpd:send_delayed_chunk(Resp,
["\n],\n\"last_seq\":", ?JSON_ENCODE(EndSeq), "}\n"]),

0 comments on commit 1895630

Please sign in to comment.