Open mwittig opened 8 years ago
Maybe connection handling in the ["driver"]() needs to be refactored. Currently it establishes a new connection for each call. Might be better to go with a singleton pattern and reuse one connection.
Agree, but synchronizing to a single connection can be tricky as it may introduce hidden "race conditions" caused depending on the ordering of events processed. I had to implement a single connection handling as part of pimatic-denon-avr as the AVR only accepts a single connection.
@mwittig yeah that is true
pimatic-led-light is producing lots of errors for me: error [pimatic-led-light]: [Error: write after end] and error [pimatic-led-light]: [Error: connection timeout]
See also https://github.com/philip1986/pimatic-led-light/issues/27