mirror of https://github.com/aria2/aria2
Call shutdown() with SHUT_WR before close to avoid TCP RST.
parent
61706acf82
commit
6f602e2809
|
@ -566,6 +566,7 @@ void SocketCore::closeConnection()
|
|||
}
|
||||
#endif // HAVE_LIBGNUTLS
|
||||
if(sockfd_ != (sock_t) -1) {
|
||||
shutdown(sockfd_, SHUT_WR);
|
||||
CLOSE(sockfd_);
|
||||
sockfd_ = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue