feat: decrease failed retry number

This commit is contained in:
Raphael Pinto 2024-09-25 22:37:10 -03:00 committed by GitHub
parent 21be562919
commit b793f53168
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -229,17 +229,17 @@ function resolvePublicIP() {
# If there is no public ip yet, we'll try to solve it using: https://ip.seeip.org
if [[ -z $PUBLIC_IP ]]; then
PUBLIC_IP=$(curl -f -m 5 -sS --retry 5 --retry-connrefused $CURL_IP_VERSION_FLAG https://ip.seeip.org 2>/dev/null)
PUBLIC_IP=$(curl -f -m 5 -sS --retry 2 --retry-connrefused $CURL_IP_VERSION_FLAG https://ip.seeip.org 2>/dev/null)
fi
# If there is no public ip yet, we'll try to solve it using: https://ifconfig.me
if [[ -z $PUBLIC_IP ]]; then
PUBLIC_IP=$(curl -f -m 5 -sS --retry 5 --retry-connrefused $CURL_IP_VERSION_FLAG https://ifconfig.me 2>/dev/null)
PUBLIC_IP=$(curl -f -m 5 -sS --retry 2 --retry-connrefused $CURL_IP_VERSION_FLAG https://ifconfig.me 2>/dev/null)
fi
# If there is no public ip yet, we'll try to solve it using: https://api.ipify.org
if [[ -z $PUBLIC_IP ]]; then
PUBLIC_IP=$(curl -f -m 5 -sS --retry 5 --retry-connrefused $CURL_IP_VERSION_FLAG https://api.ipify.org 2>/dev/null)
PUBLIC_IP=$(curl -f -m 5 -sS --retry 2 --retry-connrefused $CURL_IP_VERSION_FLAG https://api.ipify.org 2>/dev/null)
fi
# If there is no public ip yet, we'll try to solve it using: ns1.google.com