Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

umqtt.simple: Close old socket on connect #382

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

Open
x3a wants to merge 1 commit into micropython:master
base: master
Choose a base branch
Loading
from x3a:master
Open

umqtt.simple: Close old socket on connect #382

x3a wants to merge 1 commit into micropython:master from x3a:master

Conversation

@x3a
Copy link

@x3a x3a commented Apr 14, 2020

This closes the old socket of the client if one is present during a connection attempt to prevent the initialization of multiple sockets when the function is called repeatedly. It comes in handy if properly disconnecting from the broker isn't possible.

elvis-epx reacted with thumbs up emoji
This closes the old socket of the client if one is present during a
connection attempt to prevent the initialization of multiple sockets
when the function is called repeatedly.
Copy link

This PR is important because in ESP32 the maximum number of sockets is around 8 or 10, so if the old sockets are not explicitly closed or garbage-collected, they pile up until no new connections are possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /