Closed srebhan closed 7 months ago
OT: @srebhan if you're interested in using this module in concurrent situations I'd appreciate a review of https://github.com/grid-x/modbus/pull/70. Would be great to get this proposal unstuck.
@andig thanks for the hint, but currently we define multiple clients if used concurrently (though not over serial line) and are not planning to change this as of now.
OT: multiple clients sharing the same underlying network connection to the same modbus server?
@andig the code is here. You can define multiple requests in a plugin instance, those will be done sequentially. Additionally it is possible to have multiple of those plugins running concurrently and then they share nothing, i.e. each instance will open an own connection to the configured endpoint.
We can chat on out slack if you are interested in more details to avoid cluttering this PR... ;-)
@andig is there anything I should do in this commit to get this merged?
I can‘t speak for @grid-x, sorry
@hsteidl anything I can do to get this merged?
Running
go test -v -race
will report two races, one forTestSerialCloseIdle
and one forTestTCPTransporter
(see excerpt below). This PR fixes the races in both tests.and