소스 검색

Ignore SIGPIPE

yhirose 8 년 전
부모
커밋
e4ef0828b0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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()