Closed MeanSquaredError closed 1 month ago
Hi,
Where did you check, and which socket client implementation did you consider?
Both built-in synchronous socket clients TcpSocket
and OpenSslSocket
have a check for EINTR
:
If you experience a specific error or unexpected result, please provide a MWE.
Indeed I did not notice that tcp/ssl reads and writes have the check for EINTR
.
However the connect()
and SSL_connect()
calls are lacking the checks for EINTR
and they can fail with EINTR
too.
You are right, those function slipped my attention regarding EINTR
, will look into it next week. Thanks.
connect
and SSL_connect
are now checked for EINTR
in TcpSocket
and OpenSslSocket
.
Thank you for fixing that!
Hi,
After looking into the library's source code it seems that the library does not handle EINTR errors that happen when:
If these conditions are met, then the I/O operation fails with an EINTR error code.
This problem can happen easily when the program has established a handler for SIGINT in order to shutdown gracefully or re-read its configuration when it receives the signal.
The usual workaround for this issue is just retrying the I/O operation when it returns EINTR. In pseudocode it looks like this: