Topic: getting sigpipe from wolfSSL_write
hello
i have a c++ app that connects to another machine and (rarely) gets sigpipe, which is bad since i want the app to keep running and try again later
the stacktrace looks like this:
wolfSSL_write ->
SendData ->
SendBuffered.part.0 ->
EmbedSend ->
"../sysdeps/unix/sysv/linux/send.c", line 23, in __libc_send ->
"../sysdeps/unix/sysv/linux/send.c", line 28, in __libc_disable_asynccancel
i assume that the other machine disconnects between the app checking the validity of the connection and wolfSSL_write
obviously, i can make a signal handler that throws an exception on sigpipe and then catches the exception outside wolfSSL_write
but i am curious whether i can make a signal handler that ignores the sigpipe, and then just continue with the wolfSSL_write
i assume wolfSSL_write should return -1, and then i would get the exact error with wolfSSL_get_error
my questions are
1. did i understand correctly that on sigpipe while writing, although sigpipe is raised, wolfssl will return -1?
2. what is the error i would receive from wolfSSL_get_error in this case?
thank you