瀏覽代碼

Fix invalid req_timedout errors

When reusing the same connection (ibrowse worker) for multiple requests, the current
inactivity timeout must be cleared before sending a request body. When the sending of the
body takes more than inactivity_timeout milliseconds, the client will get
a req_timedout error. Currenty inactivity_timer is cleared only after sending the whole body.
pull/24/head
Filipe David Manana 14 年之前
父節點
當前提交
80e050a6ce
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      src/ibrowse_http_client.erl

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

@ -683,6 +683,7 @@ send_req_1(From,
Headers, Method, Body, Options, Timeout,
#state{status = Status,
socket = Socket} = State) ->
cancel_timer(State#state.inactivity_timer_ref, {eat_message, timeout}),
ReqId = make_req_id(),
Resp_format = get_value(response_format, Options, list),
Caller_socket_options = get_value(socket_options, Options, []),

Loading…
取消
儲存