summaryrefslogtreecommitdiff
path: root/dns/_trio_backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'dns/_trio_backend.py')
-rw-r--r--dns/_trio_backend.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/_trio_backend.py b/dns/_trio_backend.py
index 418639c..cfb0e1d 100644
--- a/dns/_trio_backend.py
+++ b/dns/_trio_backend.py
@@ -81,10 +81,10 @@ class Backend(dns._asyncbackend.Backend):
stream = None
try:
if source:
- await s.bind(_lltuple(af, source))
+ await s.bind(_lltuple(source, af))
if socktype == socket.SOCK_STREAM:
with _maybe_timeout(timeout):
- await s.connect(_lltuple(af, destination))
+ await s.connect(_lltuple(destination, af))
except Exception:
s.close()
raise