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

library throws SIGPIPE when remote system closes connection #86

Closed
kyle-github opened this issue Jan 14, 2019 · 2 comments
Closed

library throws SIGPIPE when remote system closes connection #86

kyle-github opened this issue Jan 14, 2019 · 2 comments
Labels
Milestone

Comments

@kyle-github
Copy link
Member

This may be related to #64.

When the remote PLC closes the TCP connection, the library code still attempts to call write() and that causes a SIGPIPE on Linux.

This is difficult to trigger because of buffering.

The work around, for Linux, is to use send() instead of write() with MSG_NOSIGNAL as the flags argument. Unclear if there is a similar feature for Windows.

Does this work on BSD-like systems like FreeBSD or macOS?

@kyle-github
Copy link
Member Author

This may be related to user GBT's problem reported on the forum.

@kyle-github
Copy link
Member Author

This should be closed. Testing seems to prove that this is now fixed. However, it is difficult to create SIGPIPE errors on demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant