diff --git a/examples/download_html.py b/examples/download_html.py
index e42b85b..c94f0a2 100755
--- a/examples/download_html.py
+++ b/examples/download_html.py
@@ -12,7 +12,7 @@ async def load_data():
text.insert(tk.END, "Loading...")
button.config(state=tk.DISABLED)
- async with httpx.AsyncClient() as client:
+ async with httpx.AsyncClient(timeout=30) as client:
response = await client.get("https://python.org", follow_redirects=True)
text.delete(1.0, tk.END)
diff --git a/examples/download_image.py b/examples/download_image.py
index 001b7af..f020dbb 100755
--- a/examples/download_image.py
+++ b/examples/download_image.py
@@ -12,7 +12,7 @@ async def load_image(url):
button.config(state=tk.DISABLED)
label.config(text="Loading...", image="")
- async with httpx.AsyncClient() as client:
+ async with httpx.AsyncClient(timeout=30) as client:
response = await client.get(url, follow_redirects=True)
if response.status_code != 200:
label.config(text=f"HTTP error {response.status_code}")