Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout and intervals do not match request #8

Closed
Miq1 opened this issue Sep 21, 2020 · 1 comment
Closed

Timeout and intervals do not match request #8

Miq1 opened this issue Sep 21, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Miq1
Copy link
Contributor

Miq1 commented Sep 21, 2020

Sometimes a request is issued with dedicated timeout and same host interval times, but different times are used.

@Miq1 Miq1 added the bug Something isn't working label Sep 21, 2020
@Miq1 Miq1 self-assigned this Sep 21, 2020
@Miq1
Copy link
Contributor Author

Miq1 commented Sep 21, 2020

Subtle... The times were held in the ModbusTCP class. When a request was processed in the worker task, another could have been put on the queue in the meantime, changing the times again.

Fix: have a new TargetHost struct in the requests, that holds host, port, timeout and interval for the very request. handleConnection and receive have to look at these request-local values rather than at those of the ModbusTCP instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant