Closed JohannesKauffmann closed 1 year ago
This only happens when the PLC closes the socket (for example when reprogrammed).
Fix tested, works. @JohannesKauffmann could you add some comments to the code?
Added some comments to explain what is being done.
By default,
SIGPIPE
will terminate the complete process. This is obviously not the ideal way to handle writing a closed socket. We already propagateEPIPE
using thethrow std::system_error
. So, signal to the OS not to generate a signal.The other option would be to install a signal handler for
SIGPIPE
, but that is not ideal inside a library.