gotthardp / gen_coap

Generic Erlang CoAP Client/Server
Other
106 stars 47 forks source link

Timeout for unreachable host #19

Closed tpitale closed 6 years ago

tpitale commented 6 years ago

coap_client:request(get, "coap://somehost/api")

This never times out if the host is unreachable. I see that coap_transport has mention of ACK_TIMEOUT so I'm not sure why this won't error.

Any help/ideas would be much appreciated, thanks!

gotthardp commented 6 years ago

Hi. There appears to be no timeout in the coap_client. That is of course wrong.

gotthardp commented 6 years ago

Hello again. I just made fix. Default timeout is now 30s and it can be modified by a new coap_client:request parameter.

tpitale commented 6 years ago

Thank you!