Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[Satel] Binding deactivation fix #5207

Merged
merged 1 commit into from
Aug 4, 2017
Merged

Conversation

druciak
Copy link
Member

@druciak druciak commented Jun 4, 2017

This PR fixes a deadlock when stopping the binding.

@9037568
Copy link
Contributor

9037568 commented Aug 2, 2017

I don't have enough knowledge of multithreading/concurrency.

@druciak, can you provide a summary of what this does and why it's needed?

@druciak
Copy link
Member Author

druciak commented Aug 3, 2017

I think you have enough knowledge in this case :)

There was a mistake in this commit, for some reason "synchronized" keyword on close method - which I was going to remove - was still there. Now I fixed that, thanks for spotting this mistake.

Basically "close" call did a "close" on watchdog object, which called "disconnect" method in the same SatelModule class, also synchronized. Since this was in a separate thread, we had a deadlock.
The fix removes "synchronized" from method and makes watchdog "close" outside "synchronized" block, which resolves the issue.

@9037568
Copy link
Contributor

9037568 commented Aug 4, 2017

Thanks!

@9037568 9037568 merged commit 3d8834c into openhab:master Aug 4, 2017
@9037568 9037568 added the bug label Aug 4, 2017
@9037568 9037568 added this to the 1.11.0 milestone Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants