diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-06 22:51:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-06 22:51:20 +0900 |
| commit | 6f602e2809396f002c5b737692b995bbb1187375 (patch) | |
| tree | 420458f8eecc2607137c53fb45120cf872ed8490 /src/SocketCore.cc | |
| parent | 61706acf827472085c9af217fe0e27686758e006 (diff) | |
Call shutdown() with SHUT_WR before close to avoid TCP RST.
Diffstat (limited to 'src/SocketCore.cc')
| -rw-r--r-- | src/SocketCore.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/SocketCore.cc b/src/SocketCore.cc index cf4693bf..1ed70da7 100644 --- a/src/SocketCore.cc +++ b/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; } |
