From ccd81fdcd98c02ca1396e4752831f3a21b66ce3b Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 28 Jul 2010 23:28:26 +0000 Subject: don't require integer seqnums in the changes feed, COUCHDB-838 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@980265 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_changes_feed.erl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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, -- cgit v1.2.3