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

Add port settings for proxy settings #348

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrxdegen
Copy link

No description provided.

@@ -85,13 +85,15 @@ def __init__( # noqa: PLR0913
*,
proxy_type: int,
proxy_addr: str,
proxy_port: int,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since proxy_port is an optional parameter to the underlying paho-mqtt client, it should be:

proxy_port: Optional[int] = None

and since the default proxy port changes based on proxy type, it needs to only be included in the proxy_args only if specified.

self.proxy_args = {
.
.
.
}
if proxy_port is not None:
    self.proxy_args['proxy_port'] = proxy_port

Copy link

@ajmirsky ajmirsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super helpful change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants