From a3e7853b0893c9ca7019c73f2c77de4991d5d32c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Mar 2007 02:15:31 +0000 Subject: [PATCH] shutdown sockets gracefully instead of doing it with TCP reset (patch 1682438) [backport from HEAD] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/msw/gsocket.cpp | 2 +- src/unix/gsocket.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 6375693831..fd705b012f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -91,6 +91,10 @@ Major new features in 2.8 release 2.8.3 ----- +All: + +- Shut down the sockets gracefully (Sergio Aguayo) + wxMac - Corrected top border size for wxStaticBox with empty label (nusi). diff --git a/src/msw/gsocket.cpp b/src/msw/gsocket.cpp index ed1ff5833b..62f3bfb076 100644 --- a/src/msw/gsocket.cpp +++ b/src/msw/gsocket.cpp @@ -222,7 +222,7 @@ void GSocket::Shutdown() /* If socket has been created, shutdown it */ if (m_fd != INVALID_SOCKET) { - shutdown(m_fd, 2); + shutdown(m_fd, 1 /* SD_SEND */); Close(); } diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 6e0292a78b..eeee3fa8cc 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -587,7 +587,7 @@ void GSocket::Shutdown() /* If socket has been created, shutdown it */ if (m_fd != INVALID_SOCKET) { - shutdown(m_fd, 2); + shutdown(m_fd, 1); Close(); }