Author: cgutman
Date: Mon Aug 1 03:13:18 2011
New Revision: 53014
URL:
http://svn.reactos.org/svn/reactos?rev=53014&view=rev
Log:
[OSKITTCP]
- Force the connection to be closed immediately
- Hopefully will fix the random bind issues caused by oskit becoming out of sync with the
rest of the IP library
Modified:
trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Mon Aug 1
03:13:18 2011
@@ -294,11 +294,17 @@
int OskitTCPClose( PCONNECTION_ENDPOINT connection ) {
int error;
-
- OSKLock();
- if (connection->SocketContext)
- {
- error = soclose(connection->SocketContext);
+ struct socket *socket;
+
+ OSKLock();
+ socket = connection->SocketContext;
+ if (socket)
+ {
+ /* HACK: Force abortive close by changing SO_LINGER settings */
+ socket->so_options |= SO_LINGER;
+ socket->so_linger = 0;
+
+ error = soclose(socket);
}
else
{