瀏覽代碼

Reset inactivity timeout when stream_next is invoked

This avoids plenty of connection inactivity timeouts. From a logical point of view,
the inactivity timeout should be reset not only only data is received from the socket
but also when the client asks for more data.
pull/29/head
Filipe David Manana 14 年之前
父節點
當前提交
c98fcc8108
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/ibrowse_http_client.erl

+ 1
- 1
src/ibrowse_http_client.erl 查看文件

@ -188,7 +188,7 @@ handle_info({stream_next, Req_id}, #state{socket = Socket,
cur_req = #request{req_id = Req_id}} = State) ->
%% io:format("Client process set {active, once}~n", []),
do_setopts(Socket, [{active, once}], State),
{noreply, State};
{noreply, set_inac_timer(State)};
handle_info({stream_next, _Req_id}, State) ->
_Cur_req_id = case State#state.cur_req of

Loading…
取消
儲存