Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change timeout from 10 to 30 #84

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions porkbun_ddns/porkbun_ddns.py
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ def get_public_ips(self) -> list:
"https://ipv4.icanhazip.com"]
for url in urls:
try:
with urllib.request.urlopen(url, timeout=10) as response:
with urllib.request.urlopen(url, timeout=30) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8").strip())
@@ -82,7 +82,7 @@ def get_public_ips(self) -> list:
"https://ipv6.icanhazip.com"]
for url in urls:
try:
with urllib.request.urlopen(url, timeout=10) as response:
with urllib.request.urlopen(url, timeout=30) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8").strip())
@@ -107,7 +107,7 @@ def _api(self, target: str, data: dict | None = None) -> dict:
req = urllib.request.Request(self.config["endpoint"] + target)
req.data = json.dumps(data).encode("utf8")
try:
response = urllib.request.urlopen(req, timeout=10).read()
response = urllib.request.urlopen(req, timeout=30).read()
except HTTPError as err:
if err.code == 400:
raise PorkbunDDNS_Error("Invalid API Keys!")