summaryrefslogtreecommitdiffstatshomepage
path: root/examples/network/http_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/http_client.py')
-rw-r--r--examples/network/http_client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/http_client.py b/examples/network/http_client.py
index b74daeb08d..3701e75e16 100644
--- a/examples/network/http_client.py
+++ b/examples/network/http_client.py
@@ -9,7 +9,7 @@ def main(use_stream=False):
ai = socket.getaddrinfo("google.com", 80)
print("Address infos:", ai)
- addr = ai[0][4]
+ addr = ai[0][-1]
print("Connect address:", addr)
s.connect(addr)