Skip to content

Commit

Permalink
set recv timeout to infinity in changes stream
Browse files Browse the repository at this point in the history
based on pr #147 thanks!

fix #141
fix #147
  • Loading branch information
benoitc committed Oct 22, 2016
1 parent fc14a1f commit 403dd1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/couchbeam_changes_stream.erl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ do_init_stream(#state{mref=MRef,
feed_type=FeedType}=State) ->
#db{server=Server, options=ConnOpts} = Db,
%% we are doing the request asynchronously
ConnOpts1 = [{async, once} | ConnOpts],
ConnOpts1 = [{async, once}, {recv_timeout, infinity}| ConnOpts],

%% if we are filtering the changes using docids, send a POST request
%% instead of a GET to make sure it will be accepted whatever the
Expand Down Expand Up @@ -276,7 +276,7 @@ decode_data(Data, #state{feed_type=continuous,
end;
decode_data(Data, #state{client_ref=ClientRef,
decoder=DecodeFun}=State) ->
try
try
{incomplete, DecodeFun2} = DecodeFun(Data),
try DecodeFun2(end_stream) of done ->
%% stop the request
Expand Down

0 comments on commit 403dd1a

Please sign in to comment.