这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Conversation

@pit3k
Copy link
Contributor

@pit3k pit3k commented Nov 13, 2018

This caused two different openhab threads to concurrently receive
bytes from the serial port. In turn, each thread received every other byte,
and so both threads saw corrupted frames. Even worse - threads would get
stuck waiting for response, and entire openhab was unresponsive until
restarted.

Adding synchronized helped. I've also improved logging of error (which is
now not being thrown in this scenario).

@9037568 9037568 changed the title Fix plcbus addon crash when two commands are sent in quick succession [PLCBus] Fix addon crash when two commands are sent in quick succession Nov 14, 2018
This caused two different openhab threads to concurrently receive
bytes from the serial port. In turn, each thread received every other byte,
and so both threads saw corrupted frames. Even worse - threads would get
stuck waiting for response, and entire openhab was unresponsive until
restarted.

Adding synchronized helped. I've also improved logging of error (which is
now not being thrown in this scenario).
@pit3k pit3k force-pushed the fix-plcbus-concurrecy-error branch from cb4179a to 027acf5 Compare November 14, 2018 21:22
@9037568
Copy link
Contributor

9037568 commented Nov 15, 2018

Thanks, @pit3k !

@9037568 9037568 merged commit ebfb517 into openhab:master Nov 15, 2018
@9037568 9037568 added this to the 1.13.0 milestone Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants