kurbatov / firmata4j

Firmata client written in Java.
MIT License
87 stars 45 forks source link

Executor is not stopped during FirmataDevice.shutdown() causing threads to leak #38

Closed centic9 closed 4 years ago

centic9 commented 4 years ago

In FirmataDevice() an executor is created, but shutdown does not close/shutdown/stop this Executor properly, thus every construction of a FirmataDevice will leave the executor and a thread running.

Would be nice to properly shutdown the Executor in the FiniteStateMachine to not accumulate threads in use-cases where the connection is re-established form time to time.

kurbatov commented 4 years ago

Hi Dominik,

Could you please take a look at PR #39 and tell if it handles the issue?