Core/Sockets: Always try to send MSG_NOSIGNAL in peer().send()
Fixes RASocket::authenticate crash "MSG_NOSIGNAL: If you send() to a remote host which is no longer recv()ing, you'll typically get the signal SIGPIPE. Adding this flag prevents that signal from being raised." Closes #5040 Thanks to @derex for the hint
This commit is contained in:
1 parent
2cf8cdaa80
commit
42e660e2a2
3 files changed
+11
-2
No files matched your search
@@ -336,7 +336,12 @@ int RASocket::subnegotiate()
|
||||
|
||||
//! Just send back end of subnegotiation packet
|
||||
uint8 const reply[2] = {0xFF, 0xF0};
|
||||
|
||||
#ifdef MSG_NOSIGNAL
|
||||
return int(peer().send(reply, 2, MSG_NOSIGNAL));
|
||||
#else
|
||||
return int(peer().send(reply, 2));
|
||||
#endif // MSG_NOSIGNAL
|
||||
}
|
||||
|
||||
int RASocket::svc(void)
|
||||
|
||||
Reference in new issue
Block a user