[go: up one dir, main page]

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

MQTT code optimization/formatting #23072

Merged
merged 3 commits into from
Jun 18, 2024
Merged

MQTT code optimization/formatting #23072

merged 3 commits into from
Jun 18, 2024

Conversation

Nerivec
Copy link
Collaborator
@Nerivec Nerivec commented Jun 15, 2024
  • Fix missing await

@Koenkk can you take a look at the onConnect function. Seems like the variable assignment in connect and the @bind are unnecessary? Maybe the whole function's body can just be moved in the connect event?

@Koenkk
Copy link
Owner
Koenkk commented Jun 16, 2024

I think the var assignment is required (failing test should provide proof of that when removing), but the bind isnt

lib/mqtt.ts Outdated Show resolved Hide resolved
@Nerivec
Copy link
Collaborator Author
Nerivec commented Jun 16, 2024

I'm tempted to move onConnect() in-place instead of having a function call inside an anon function, not much difference in readability, and everything would be... in-place, but I'll let you decide.

@Koenkk
Copy link
Owner
Koenkk commented Jun 17, 2024

Thats also fine!

@Koenkk Koenkk merged commit 9c2264e into Koenkk:dev Jun 18, 2024
11 checks passed
@Nerivec Nerivec deleted the mqtt-cleanup branch June 18, 2024 13:39
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