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

[innogysmarthome] Fix possible resource leak #8080

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented Jul 5, 2020

Related to #8027

Signed-off-by: Laurent Garnier lg.hc@free.fr

@TravisBuddy
Copy link

Travis tests were successful

Hey @lolodomo,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@TravisBuddy
Copy link

Travis tests were successful

Hey @lolodomo,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@TravisBuddy
Copy link

Travis tests were successful

Hey @lolodomo,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@J-N-K J-N-K merged commit b315a5e into openhab:2.5.x Jul 8, 2020
@lolodomo lolodomo deleted the innogy_wsclientstop branch July 8, 2020 16:32
@cpmeister cpmeister added this to the 2.5.7 milestone Jul 8, 2020
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this pull request Jul 12, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: CSchlipp <christian@schlipp.de>
@Novanic
Copy link
Contributor

Novanic commented Jul 31, 2020

@lolodomo This fix seems to have negative side-effects. :-( The line "client.stop();" causes that the method org.openhab.binding.innogysmarthome.internal.InnogyWebSocket#onClose() is called with status "1006" (Status.NO_CLOSE or Status.ABNORMAL) and that causes that the a reconnect attempt is executed.

That leads to an infinite loop (at least since my pull-request #8186 which fixed that no reconnect attempts were executed ... ;-)).

Why is the status 1006 (NO_CLOSE / ABNORMAL) when this issue should fix false closed websockets? How can it get closed with status 1000 (NORMAL)?

@lolodomo
Copy link
Contributor Author

lolodomo commented Aug 1, 2020

You can revert my change if it leads to a problem.

MPH80 pushed a commit to MPH80/openhab-addons that referenced this pull request Aug 3, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: MPH80 <michael@hazelden.me>
Hilbrand pushed a commit that referenced this pull request Aug 20, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak #8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes #8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
taboneclayton pushed a commit to taboneclayton/openhab-addons that referenced this pull request Aug 23, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
Signed-off-by: Clayton Tabone <taboneclayton@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Related to openhab#8027

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
* When an error occurs, it is waited at least for 30 seconds to avoid too many requests (on re-occurring errors).
* Workaround for side-effect of "Fix possible resource leak openhab#8080" - Improved by not rescheduling when the close/stop was actively triggered by the binding (in this case there is already a reschedule triggered)
* NPE fixed
* Code-Optimization

Closes openhab#8182 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
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.

5 participants