4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 12:29:32 +08:00

* fhandler_socket.cc (fhandler_socket::close): Disable enforced

lingering since the original problem can no longer be reproduced.
This commit is contained in:
Corinna Vinschen 2008-04-16 17:22:14 +00:00
parent ab6cadb0c3
commit ff5007dfdd
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-04-16 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::close): Disable enforced
lingering since the original problem can no longer be reproduced.
2008-04-16 Corinna Vinschen <corinna@vinschen.de> 2008-04-16 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (internal_getgroups): Drop local buf. Allocate groups * grp.cc (internal_getgroups): Drop local buf. Allocate groups

View File

@ -1460,7 +1460,11 @@ int
fhandler_socket::close () fhandler_socket::close ()
{ {
int res = 0; 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 /* HACK to allow a graceful shutdown even if shutdown() hasn't been
called by the application. Note that this isn't the ultimate called by the application. Note that this isn't the ultimate
solution but it helps in many cases. */ 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. */ linger.l_linger = 240; /* secs. default 2MSL value according to MSDN. */
setsockopt (get_socket (), SOL_SOCKET, SO_LINGER, setsockopt (get_socket (), SOL_SOCKET, SO_LINGER,
(const char *)&linger, sizeof linger); (const char *)&linger, sizeof linger);
#endif
release_events (); release_events ();
while ((res = closesocket (get_socket ())) != 0) while ((res = closesocket (get_socket ())) != 0)
{ {