-
Notifications
You must be signed in to change notification settings - Fork 537
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
Replace the time.After with the timer for efficiency. #671
Conversation
Signed-off-by: Daniele Vasselli <[email protected]>
Thanks for the change; however this will deadlock if the timer does fire example. As the timer is not reused there is no real need to drain the channel. |
Signed-off-by Daniele Vasselli <[email protected]>
Ohhh I totally misunderstood the documentation of |
You are not the first person to do so. Thanks for the PR. |
Happy to have learned something new! Any chance you can make a new tag for this so I can import it? |
Sorry - not going to do a new release for every small change. Just get the package with |
This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/eclipse/paho.mqtt.golang](https://github.com/eclipse/paho.mqtt.golang) | require | minor | `v1.4.3` -> `v1.5.0` | --- ### Release Notes <details> <summary>eclipse/paho.mqtt.golang (github.com/eclipse/paho.mqtt.golang)</summary> ### [`v1.5.0`](https://github.com/eclipse/paho.mqtt.golang/releases/tag/v1.5.0) [Compare Source](eclipse-paho/paho.mqtt.golang@v1.4.3...v1.5.0) In the year since the release of v1.4.3 the majority of changes have been small incremental improvements/fixes. One notable change is that Go v1.20+ is now required (due to MR [#​646](eclipse-paho/paho.mqtt.golang#646)). #### What's Changed - Wrap connection network errors by [@​adriansmares](https://github.com/adriansmares) in eclipse-paho/paho.mqtt.golang#646 - Clarify use of token.WaitTimeout by [@​MattBrittan](https://github.com/MattBrittan) in eclipse-paho/paho.mqtt.golang#659 - fix ([#​661](eclipse-paho/paho.mqtt.golang#661)): Add NewClientOptionsReader for mocking purposes. by [@​avmunm](https://github.com/avmunm) in eclipse-paho/paho.mqtt.golang#662 - fix: fix keep-alive timeouts on small intervals by [@​lefinal](https://github.com/lefinal) in eclipse-paho/paho.mqtt.golang#667 - Replace the time.After with the timer for efficiency. by [@​DVasselli](https://github.com/DVasselli) in eclipse-paho/paho.mqtt.golang#671 - fix: deprecation warnings for ioutil by [@​vruge](https://github.com/vruge) in eclipse-paho/paho.mqtt.golang#665 - fix: issue 675:goroutine leak when connectionUp(true) return error by [@​kiqi007](https://github.com/kiqi007) in eclipse-paho/paho.mqtt.golang#678 - Update dependencies by [@​MattBrittan](https://github.com/MattBrittan) in eclipse-paho/paho.mqtt.golang#683 #### New Contributors - [@​adriansmares](https://github.com/adriansmares) made their first contribution in eclipse-paho/paho.mqtt.golang#646 - [@​avmunm](https://github.com/avmunm) made their first contribution in eclipse-paho/paho.mqtt.golang#662 - [@​lefinal](https://github.com/lefinal) made their first contribution in eclipse-paho/paho.mqtt.golang#667 - [@​DVasselli](https://github.com/DVasselli) made their first contribution in eclipse-paho/paho.mqtt.golang#671 - [@​vruge](https://github.com/vruge) made their first contribution in eclipse-paho/paho.mqtt.golang#665 - [@​kiqi007](https://github.com/kiqi007) made their first contribution in eclipse-paho/paho.mqtt.golang#678 **Full Changelog**: eclipse-paho/paho.mqtt.golang@v1.4.3...v1.5.0 </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119--> See merge request alpine/infra/build-server-status!15
The old
time.After
was not stopping the internal timer creating a huge resource overhead for frequently publishing clients. This way we stop the timer in thedefer
increasing efficiency.Signed-off-by: Daniele Vasselli [email protected]