Explorar el Código

Ignore SIGPIPE

yhirose hace 8 años
padre
commit
e4ef0828b0
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      httplib.h

+ 3 - 0
httplib.h

@@ -815,6 +815,9 @@ inline int SocketStream::write(const char* ptr)
 inline Server::Server()
     : svr_sock_(-1)
 {
+#ifndef _MSC_VER
+    signal(SIGPIPE, SIG_IGN);
+#endif
 }
 
 inline Server::~Server()