-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
Signed-off-by: Jan N. Klug <[email protected]>
Travis tests were successfulHey @J-N-K, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -93,6 +95,10 @@ public void close() { | |||
session.close(); | |||
session = null; | |||
} | |||
|
|||
if (sessionFuture != null && !sessionFuture.isDone()) { |
There was a problem hiding this comment.
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.
Line 158 in 19b5dd3
session = null; |
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?
There was a problem hiding this comment.
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?
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: CSchlipp <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: MPH80 <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
Related to #8027
Signed-off-by: Jan N. Klug [email protected]