Overview
HI @gaborcsardi. Thanks for creating such a great package. I have a suggestion for a small improvement.
The R_PKG_SEARCH_SERVER can occasionally be unavailable link.
The curl::curl_fetch_memory has a long timeout set by default (10[s]).
> curl::curl_fetch_memory(test_url)
Error in curl::curl_fetch_memory(test_url) :
Timeout was reached: [gladki.pl:4321] Connection timeout after 10001 ms
Fortunately, the timeout setting can be easily changed
> new_handle <- curl::new_handle(url = test_url)
> curl::handle_setopt(
+ new_handle,
+ .list = list(timeout = 2)
+ )
> curl::curl_fetch_memory(test_url, handle = new_handle)
Error in curl::curl_fetch_memory(test_url, handle = new_handle) :
Timeout was reached: [gladki.pl:4321] Connection timed out after 2002 milliseconds
Proposed solution
Add the possibility to change the timeout for the curl's connect phase. With such a change, if R_PKG_SEARCH_SERVER becomes unavailable, one can spot the error faster than within 10[s].
Overview
HI @gaborcsardi. Thanks for creating such a great package. I have a suggestion for a small improvement.
The
R_PKG_SEARCH_SERVERcan occasionally be unavailable link.The
curl::curl_fetch_memoryhas a long timeout set by default (10[s]).Fortunately, the timeout setting can be easily changed
Proposed solution
Add the possibility to change the timeout for the curl's connect phase. With such a change, if
R_PKG_SEARCH_SERVERbecomes unavailable, one can spot the error faster than within 10[s].