Explorar el Código

Call shutdown() with SHUT_WR before close to avoid TCP RST.

Tatsuhiro Tsujikawa hace 14 años
padre
commit
6f602e2809
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/SocketCore.cc

+ 1 - 0
src/SocketCore.cc

@@ -566,6 +566,7 @@ void SocketCore::closeConnection()
   }
 #endif // HAVE_LIBGNUTLS
   if(sockfd_ != (sock_t) -1) {
+    shutdown(sockfd_, SHUT_WR);
     CLOSE(sockfd_);
     sockfd_ = -1;
   }