[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

svn path=/trunk/; revision=53014
This commit is contained in:
Cameron Gutman 2011-08-01 03:13:18 +00:00
parent 2ec386e0dc
commit f1f448e2ba

View file

@ -294,11 +294,17 @@ int OskitTCPShutdown(PCONNECTION_ENDPOINT connection, int disconn_type) {
int OskitTCPClose( PCONNECTION_ENDPOINT connection ) {
int error;
struct socket *socket;
OSKLock();
if (connection->SocketContext)
socket = connection->SocketContext;
if (socket)
{
error = soclose(connection->SocketContext);
/* HACK: Force abortive close by changing SO_LINGER settings */
socket->so_options |= SO_LINGER;
socket->so_linger = 0;
error = soclose(socket);
}
else
{