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

[kodi] fix possible resource leak #8030

Merged
merged 1 commit into from
Jun 28, 2020
Merged

[kodi] fix possible resource leak #8030

merged 1 commit into from
Jun 28, 2020

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Jun 28, 2020

Related to #8027

Signed-off-by: Jan N. Klug [email protected]

Signed-off-by: Jan N. Klug <[email protected]>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of an add-on label Jun 28, 2020
@J-N-K J-N-K requested review from cweitkamp and pail23 as code owners June 28, 2020 15:48
@TravisBuddy
Copy link

Travis tests were successful

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

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

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

LGTM

@cpmeister cpmeister merged commit 09c93c5 into openhab:2.5.x Jun 28, 2020
@cpmeister cpmeister added this to the 2.5.7 milestone Jun 28, 2020
@@ -93,6 +95,10 @@ public void close() {
session.close();
session = null;
}

if (sessionFuture != null && !sessionFuture.isDone()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@J-N-K I 've an additional question because I've the slight feeling that we still have a potential leak in this class.

The KodiWebSocketListener sets the session = null in the onClose() method.

The onClose() method will be called by onError() too. Isn't that a potential problem too? Shouldn't we either cancel the future there too or should we omit setting session to null anyway. What's your thoughts on that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Randomly seeing this comment, did you reach a conclusion?

@J-N-K J-N-K deleted the kodi-8027 branch July 9, 2020 17:50
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this pull request Jul 12, 2020
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this pull request Aug 3, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants