diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-16 17:22:14 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-16 17:22:14 +0000 |
commit | ff5007dfdd321435adb1cc3abeb0120af2d564f3 (patch) | |
tree | a0e8c9ec3f1377a3a2bfe714c370f80154a53a6a /winsup/cygwin/fhandler_socket.cc | |
parent | ab6cadb0c3bb584c5e861ecb16e600ba4e2e154b (diff) | |
download | cygnal-ff5007dfdd321435adb1cc3abeb0120af2d564f3.tar.gz cygnal-ff5007dfdd321435adb1cc3abeb0120af2d564f3.tar.bz2 cygnal-ff5007dfdd321435adb1cc3abeb0120af2d564f3.zip |
* fhandler_socket.cc (fhandler_socket::close): Disable enforced
lingering since the original problem can no longer be reproduced.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index d25733629..50aaf1f83 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1460,7 +1460,11 @@ int fhandler_socket::close () { int res = 0; - + /* TODO: CV - 2008-04-16. Lingering disabled. The original problem + could be no longer reproduced on NT4, XP, 2K8. Any return of a + spurious "Connection reset by peer" *could* be caused by disabling + the linger code here... */ +#if 0 /* HACK to allow a graceful shutdown even if shutdown() hasn't been called by the application. Note that this isn't the ultimate solution but it helps in many cases. */ @@ -1469,7 +1473,7 @@ fhandler_socket::close () linger.l_linger = 240; /* secs. default 2MSL value according to MSDN. */ setsockopt (get_socket (), SOL_SOCKET, SO_LINGER, (const char *)&linger, sizeof linger); - +#endif release_events (); while ((res = closesocket (get_socket ())) != 0) { |