ithewei 6 년 전
부모
커밋
9974841062
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hsocket.cpp

+ 1 - 1
hsocket.cpp

@@ -66,7 +66,7 @@ int Connect(const char* host, int port, int nonblock) {
         nonblocking(connfd);
     }
     int ret = connect(connfd, (struct sockaddr*)&addr, addrlen);
-    if (ret != 0 && ret != EINPROGRESS) {
+    if (ret < 0 && sockerrno != EINPROGRESS) {
         perror("connect");
         return -30;
     }