Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connect_srv()'s arguments to include bind_port #759

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/paho/mqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,13 +913,13 @@ def connect(self, host, port=1883, keepalive=60, bind_address="", bind_port=0,
bind_address, bind_port, clean_start, properties)
return self.reconnect()

def connect_srv(self, domain=None, keepalive=60, bind_address="",
def connect_srv(self, domain=None, keepalive=60, bind_address="", bind_port=0,
clean_start=MQTT_CLEAN_START_FIRST_ONLY, properties=None):
"""Connect to a remote broker.

domain is the DNS domain to search for SRV records; if None,
try to determine local domain name.
keepalive, bind_address, clean_start and properties are as for connect()
keepalive, bind_address, bind_port, clean_start and properties are as for connect()
"""

if HAVE_DNS is False:
Expand Down Expand Up @@ -948,7 +948,7 @@ def connect_srv(self, domain=None, keepalive=60, bind_address="",
host, port, prio, weight = answer

try:
return self.connect(host, port, keepalive, bind_address, clean_start, properties)
return self.connect(host, port, keepalive, bind_address, bind_port, clean_start, properties)
except Exception:
pass

Expand Down