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

pull/1/head
Tatsuhiro Tsujikawa 2011-07-06 22:51:20 +09:00
parent 61706acf82
commit 6f602e2809
1 changed files with 1 additions and 0 deletions

View File

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