Skip to content

Commit

Permalink
default port handling (#356)
Browse files Browse the repository at this point in the history
Let the function `set_io` handle the default port.
The issue is that the duplicated default port setting sets it always to `constants.DEFAULT_AMQPS_PORT` if no port is specified.
  • Loading branch information
MkKiefer authored Feb 7, 2023
1 parent 7473353 commit da6ef72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uamqp/authentication/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class SASLPlain(AMQPAuth):
"""

def __init__(
self, hostname, username, password, port=constants.DEFAULT_AMQPS_PORT,
self, hostname, username, password, port=None,
verify=None, http_proxy=None, transport_type=TransportType.Amqp, encoding='UTF-8'):
self._encoding = encoding
self.hostname = self._encode(hostname)
Expand Down Expand Up @@ -206,7 +206,7 @@ class SASLAnonymous(AMQPAuth):
:type encoding: str
"""

def __init__(self, hostname, port=constants.DEFAULT_AMQPS_PORT, verify=None,
def __init__(self, hostname, port=None, verify=None,
http_proxy=None, transport_type=TransportType.Amqp, encoding='UTF-8'):
self._encoding = encoding
self.hostname = self._encode(hostname)
Expand Down

0 comments on commit da6ef72

Please sign in to comment.