Skip to content

Conversation

@janiversen
Copy link
Collaborator

client/sync.py/_recv contains a select call, which causes problems if the server aborts, without closing the socket properly.

The loop means that the socket can go "invalid" while waiting for data.

This is tested with a software server, that does assert, after having read a couple of times. This is however a kind of timing issue, because the client needs to be in the _recv loop.

fixes #721

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@janiversen
Copy link
Collaborator Author

That does not look like something I caused.

@swamper123
Copy link
Collaborator

That does not look like something I caused.

Nope...seems to be an common error in the setup for that version.

actions/setup-python#311

I will kick it again.

@swamper123
Copy link
Collaborator

Hmm... issue still present... @dhoomakethu would you merge it anyway, since the setup for macOS PyPy 3.6 seems to be faulty? Or do you have a clue perhaps what's happening?

@janiversen
Copy link
Collaborator Author

Would be nice to get this in the codebase.

@dhoomakethu dhoomakethu merged commit 93fc0fb into pymodbus-dev:dev Mar 27, 2022
@janiversen janiversen deleted the selectorTest branch March 27, 2022 12:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sync modbus tcp crashed when server breaks connection (in HomeAssistant)

3 participants