steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
275 stars 110 forks source link

modbus slave factory getSlave fix #128

Closed mkurt closed 1 year ago

mkurt commented 2 years ago

Hi,

Current use of getSlave(int) method is incorrect because we ask for the key that we did not put at the first place. Also when closing serial slave we did not remove by portname of serial params. I fixed those problems and added some necessary synchronization.