mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[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:
parent
2ec386e0dc
commit
f1f448e2ba
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue