mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 06:59:46 -04:00
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:
@@ -372,9 +372,9 @@ int WorldSocket::handle_output_queue (GuardType& g)
|
||||
const size_t send_len = mblk->length();
|
||||
|
||||
#ifdef MSG_NOSIGNAL
|
||||
ssize_t n = peer().send (mblk->rd_ptr(), send_len, MSG_NOSIGNAL);
|
||||
ssize_t n = peer().send(mblk->rd_ptr(), send_len, MSG_NOSIGNAL);
|
||||
#else
|
||||
ssize_t n = peer().send (mblk->rd_ptr(), send_len);
|
||||
ssize_t n = peer().send(mblk->rd_ptr(), send_len);
|
||||
#endif // MSG_NOSIGNAL
|
||||
|
||||
if (n == 0)
|
||||
|
||||
Reference in New Issue
Block a user