Browse Source

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 years ago
parent
commit
80e050a6ce
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/ibrowse_http_client.erl

+ 1
- 0
src/ibrowse_http_client.erl View File

@ -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…
Cancel
Save