mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
[IP]
- Fix a major bug in socket closure. Prior to this, a socket with pending IRPs that could not be satisfied when the socket was closed would be destroyed without completing the pending requests. Now, we check all of our IRP queues if we get a SEL_FIN signal and kill all the requests that cannot be satisfied immediately. - Maybe it's just me but Firefox 2 seems much more responsive after this fix (like actually usable!) svn path=/trunk/; revision=48561
This commit is contained in:
parent
1cbf4c4057
commit
8f474295b5
|
@ -35,20 +35,20 @@ VOID HandleSignalledConnection(PCONNECTION_ENDPOINT Connection)
|
|||
Connection, Connection->SocketContext));
|
||||
|
||||
/* Things that can happen when we try the initial connection */
|
||||
if( Connection->SignalState & SEL_CONNECT ) {
|
||||
if( Connection->SignalState & (SEL_CONNECT | SEL_FIN) ) {
|
||||
while (!IsListEmpty(&Connection->ConnectRequest)) {
|
||||
Entry = RemoveHeadList( &Connection->ConnectRequest );
|
||||
|
||||
Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
|
||||
|
||||
Bucket->Status = STATUS_SUCCESS;
|
||||
Bucket->Status = (Connection->SignalState & SEL_CONNECT) ? STATUS_SUCCESS : STATUS_CANCELLED;
|
||||
Bucket->Information = 0;
|
||||
|
||||
InsertTailList(&Connection->CompletionQueue, &Bucket->Entry);
|
||||
}
|
||||
}
|
||||
|
||||
if( Connection->SignalState & SEL_ACCEPT ) {
|
||||
if( Connection->SignalState & (SEL_ACCEPT | SEL_FIN) ) {
|
||||
/* Handle readable on a listening socket --
|
||||
* TODO: Implement filtering
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ VOID HandleSignalledConnection(PCONNECTION_ENDPOINT Connection)
|
|||
}
|
||||
|
||||
/* Things that happen after we're connected */
|
||||
if( Connection->SignalState & SEL_READ ) {
|
||||
if( Connection->SignalState & (SEL_READ | SEL_FIN) ) {
|
||||
TI_DbgPrint(DEBUG_TCP,("Readable: irp list %s\n",
|
||||
IsListEmpty(&Connection->ReceiveRequest) ?
|
||||
"empty" : "nonempty"));
|
||||
|
@ -145,7 +145,7 @@ VOID HandleSignalledConnection(PCONNECTION_ENDPOINT Connection)
|
|||
}
|
||||
}
|
||||
}
|
||||
if( Connection->SignalState & SEL_WRITE ) {
|
||||
if( Connection->SignalState & (SEL_WRITE | SEL_FIN) ) {
|
||||
TI_DbgPrint(DEBUG_TCP,("Writeable: irp list %s\n",
|
||||
IsListEmpty(&Connection->SendRequest) ?
|
||||
"empty" : "nonempty"));
|
||||
|
|
Loading…
Reference in a new issue