Fixed SIGPIPE on cSocket::Send().
This commit is contained in:
parent
a085319455
commit
4da8818291
@ -7,17 +7,6 @@
|
||||
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
#ifdef __MACH__
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cBlockingTCPLink::cBlockingTCPLink(void)
|
||||
{
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ int cSocket::Receive(char* a_Buffer, unsigned int a_Length, unsigned int a_Flags
|
||||
|
||||
int cSocket::Send(const char * a_Buffer, unsigned int a_Length)
|
||||
{
|
||||
return send(m_Socket, a_Buffer, a_Length, 0);
|
||||
return send(m_Socket, a_Buffer, a_Length, MSG_NOSIGNAL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,6 +5,18 @@
|
||||
|
||||
|
||||
|
||||
// Windows and MacOSX don't have the MSG_NOSIGNAL flag
|
||||
#if ( \
|
||||
defined(_WIN32) || \
|
||||
(defined(__APPLE__) && defined(__MACH__)) \
|
||||
)
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cSocket
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user