SparkPost / elixir-sparkpost

SparkPost client library for Elixir https://developers.sparkpost.com
Apache License 2.0
44 stars 13 forks source link

HTTPoison timout option #25

Closed davidefedrigo closed 7 years ago

davidefedrigo commented 7 years ago

After the migration from HTTPotion to HTTPoison, I started to get timeout errors.

It seems the meaning of (sparkpost) http_timeout slightly changed. HTTPoison handles two different timeout options:

:timeout - timeout to establish a connection, in milliseconds. Default is 8000 :recv_timeout - timeout used when receiving a connection. Default is 5000

http_timeout should be used to populate recv_timeout, but it is currently tied to timeout.

I fixed it and I'm testing it right now. No errors so far, tomorrow I'll send a PR.