forked from platypush/platypush
Fixed MQTT over SSL default version spec in case the parameter is not a string
This commit is contained in:
parent
0bddbb0bca
commit
816492d3b2
1 changed files with 6 additions and 1 deletions
|
@ -82,7 +82,12 @@ class MqttPlugin(Plugin):
|
||||||
if not version:
|
if not version:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if type(version) == type(ssl.PROTOCOL_TLS):
|
||||||
|
return version
|
||||||
|
|
||||||
|
if isinstance(version, str):
|
||||||
version = version.lower()
|
version = version.lower()
|
||||||
|
|
||||||
if version == 'tls':
|
if version == 'tls':
|
||||||
return ssl.PROTOCOL_TLS
|
return ssl.PROTOCOL_TLS
|
||||||
if version == 'tlsv1':
|
if version == 'tlsv1':
|
||||||
|
|
Loading…
Reference in a new issue