SMB2Client: Correctly handle async responses

This commit is contained in:
TalAloni 2021-04-15 21:12:38 +03:00
parent f2c8c22703
commit 6f2b9fa3ca

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2017-2020 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved. /* Copyright (C) 2017-2021 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
* *
* You can redistribute this program and/or modify it under the terms of * You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -481,6 +481,11 @@ namespace SMBLibrary.Client
if (command.CommandName == commandName) if (command.CommandName == commandName)
{ {
m_incomingQueue.RemoveAt(index); m_incomingQueue.RemoveAt(index);
if (command.Header.IsAsync && command.Header.Status == NTStatus.STATUS_PENDING)
{
index--;
continue;
}
return command; return command;
} }
} }