summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/couchdb/couch_rep_changes_feed.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/couchdb/couch_rep_changes_feed.erl b/src/couchdb/couch_rep_changes_feed.erl
index b1d3960d..4c7dc35a 100644
--- a/src/couchdb/couch_rep_changes_feed.erl
+++ b/src/couchdb/couch_rep_changes_feed.erl
@@ -273,12 +273,10 @@ handle_messages([], State) ->
{noreply, State};
handle_messages([<<"{\"results\":[">>|Rest], State) ->
handle_messages(Rest, State);
-handle_messages([<<"]">>, <<"\"last_seq\":", LastSeqStr/binary>>], State) ->
- LastSeq = list_to_integer(?b2l(hd(re:split(LastSeqStr, "}")))),
- handle_feed_completion(State#state{last_seq = LastSeq});
-handle_messages([<<"{\"last_seq\":", LastSeqStr/binary>>], State) ->
- LastSeq = list_to_integer(?b2l(hd(re:split(LastSeqStr, "}")))),
- handle_feed_completion(State#state{last_seq = LastSeq});
+handle_messages([<<"]">>, <<"\"last_seq\":", _/binary>>], State) ->
+ handle_feed_completion(State);
+handle_messages([<<"{\"last_seq\":", _/binary>>], State) ->
+ handle_feed_completion(State);
handle_messages([Chunk|Rest], State) ->
#state{
count = Count,