-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
This is the standard config in ada/etc/ada.conf:
# Adding --ipv4 to the default curl options.
# We're running on an IPv4 only system, but curl still tries IPv6.
# When the API is down, curl will say "Network is unreachable";
# But curl --ipv4 will say: "Connection refused" which is more clear.
curl_options_common=(
-H "accept: application/json"
--fail --silent --show-error
--ipv4
)
It turns out, that when listening to a channel, curl_options_common is not used, and then the --ipv4 option is skipped, which may lead to an error (if IPv6 is not properly supported).
I think it's this piece of code:
curl "${curl_authorization[@]}" \
"${curl_options_stream[@]}" \
-X GET "$channel" \
"${last_event_id_header[@]}"
curl_options_common is not in here by design, because listening to channels required some different curl options than most other API operations.
Options:
- Add
curl_options_streamtoada/etc/ada.confwith an--ipv4option. This is easy. - Make sure
curl_options_commonis applied to ALL operations. We'd have to move some curl arguments around to make this work.