Browse Source

Ignore SIGPIPE

yhirose 8 năm trước cách đây
mục cha
commit
e4ef0828b0
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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()