You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One issue I've noticed so far: If the connection gets disconnected for some reason just before a CTCPServer::Send call, then Send will result in a SIGPIPE under Linux, aborting the program.
Instead, this should be handled gracefully (ex Send should return an error).
Thanks for that. Yea, for the send call, I ended up changing the flags passed to MSG_NOSIGNAL (I think recv needs the same). IMO this be the default for this lib, but I'll let you decide. :)
Activity
embeddedmz commentedon Apr 21, 2021
Hello logidelic,
You're welcome.
Some insights to fix this issue :
https://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly
https://stackoverflow.com/questions/48229430/sigpipe-in-c-determining-which-tcp-socket-is-disconnected
logidelic commentedon Apr 21, 2021
Thanks for that. Yea, for the
sendcall, I ended up changing the flags passed toMSG_NOSIGNAL(I thinkrecvneeds the same). IMO this be the default for this lib, but I'll let you decide. :)