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

Fix resuming CCTcpip #517

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

thc3si
Copy link
Contributor

@thc3si thc3si commented Nov 14, 2024

When an auxiliary such as InstrumentControlAuxiliary is suspended then resumed, its channel has its methods _cc_close, then _cc_open called.

The CCTcpip connector currently doesn't support that: once _cc_close has been called, _cc_open cannot be called anymore. This is because socket.socket does not support reopening a closed socket.

The changes here create the socket in _cc_open, allowing multiple _cc_open / _cc_close cycles.

Relevant test (tests/test_cc_tcp_ip.py) has been updated, because it depended on using various methods of CCTcpip without first calling _cc_open. This use case should not happen in the real world, and doesn't work anymore now that the socket is only created in _cc_open.

@Pog3k Pog3k merged commit 21ea0ea into eclipse-kiso-testing:master Nov 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants