]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Properly pass source and source_port to connect() in the sync version of quic().
authorBob Halley <halley@dnspython.org>
Fri, 16 Dec 2022 21:49:25 +0000 (13:49 -0800)
committerBob Halley <halley@dnspython.org>
Fri, 16 Dec 2022 21:49:25 +0000 (13:49 -0800)
dns/query.py

index 0eebefd165982dcaf17414b77c33e44c18804d93..11e5fc8c21e4aa3664eb0b1f010d76a5d50d42cf 100644 (file)
@@ -1070,8 +1070,8 @@ def quic(
     where: str,
     timeout: Optional[float] = None,
     port: int = 853,
-    source: Optional[str] = None,  # pylint: disable=unused-argument
-    source_port: int = 0,  # pylint: disable=unused-argument
+    source: Optional[str] = None,
+    source_port: int = 0,
     one_rr_per_rrset: bool = False,
     ignore_trailing: bool = False,
     connection: Optional[dns.quic.SyncQuicConnection] = None,
@@ -1126,7 +1126,7 @@ def quic(
 
     with manager:
         if not connection:
-            the_connection = the_manager.connect(where, port)
+            the_connection = the_manager.connect(where, port, source, source_port)
         start = time.time()
         with the_connection.make_stream() as stream:
             stream.send(wire, True)