Commit d942f128 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

http.sys: Cancel outstanding requests when a handle is closed.

parent fb35743f
......@@ -1396,8 +1396,20 @@ static NTSTATUS WINAPI dispatch_close(DEVICE_OBJECT *device, IRP *irp)
{
IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp);
struct request_queue *queue = stack->FileObject->FsContext;
LIST_ENTRY *entry;
TRACE("Closing queue %p.\n", queue);
EnterCriticalSection(&http_cs);
while ((entry = queue->irp_queue.Flink) != &queue->irp_queue)
{
IRP *queued_irp = CONTAINING_RECORD(entry, IRP, Tail.Overlay.ListEntry);
IoCancelIrp(queued_irp);
}
LeaveCriticalSection(&http_cs);
close_queue(queue);
irp->IoStatus.Status = STATUS_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment