mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix "No SerialPortProvider found" on startup (#939)
Change reference cardinality from MULTIPLE to AT_LEAST_ONE so the serial port provider can be used immediately when ThingHandlers are initialized. Fixes #937 This would always result in the following logging on startup: [WARN ] [serial.internal.SerialPortManagerImpl] - No SerialPortProvider found for: /dev/ttyUSB0 Bindings without serial port reconnection logic would need to be manually restarted (Z-Wave Binding). Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
95e0190d55
commit
9e7c6af1c8
@ -50,7 +50,7 @@ public class SerialPortRegistry {
|
||||
*
|
||||
* @param creator
|
||||
*/
|
||||
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
|
||||
@Reference(cardinality = ReferenceCardinality.AT_LEAST_ONE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
|
||||
protected void registerSerialPortCreator(SerialPortProvider creator) {
|
||||
synchronized (this.portCreators) {
|
||||
this.portCreators.add(creator);
|
||||
|
Loading…
Reference in New Issue
Block a user