Prevent a crash when the value of custom_port is not expected
This commit is contained in:
parent
915dc7fa9d
commit
a7e3814c09
1 changed files with 2 additions and 0 deletions
|
@ -77,6 +77,8 @@ class Connection(sleekxmpp.ClientXMPP):
|
|||
# (domain, config.get('port', 5222))
|
||||
custom_host = config.get('custom_host', '')
|
||||
custom_port = config.get('custom_port', 5222)
|
||||
if custom_port == -1:
|
||||
custom_port = 5222
|
||||
if custom_host:
|
||||
res = self.connect((custom_host, custom_port), reattempt=False)
|
||||
elif custom_port != 5222 and custom_port != -1:
|
||||
|
|
Loading…
Reference in a new issue