Explorar el Código

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 hace 14 años
padre
commit
80e050a6ce
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. +1
    -0
      src/ibrowse_http_client.erl

+ 1
- 0
src/ibrowse_http_client.erl Ver fichero

@ -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, []),

Cargando…
Cancelar
Guardar