diff --git a/SMBLibrary/Client/SMB2Client.cs b/SMBLibrary/Client/SMB2Client.cs index cdd1af8..d87bef4 100644 --- a/SMBLibrary/Client/SMB2Client.cs +++ b/SMBLibrary/Client/SMB2Client.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2017-2020 Tal Aloni . All rights reserved. +/* Copyright (C) 2017-2021 Tal Aloni . All rights reserved. * * 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, @@ -481,6 +481,11 @@ namespace SMBLibrary.Client if (command.CommandName == commandName) { m_incomingQueue.RemoveAt(index); + if (command.Header.IsAsync && command.Header.Status == NTStatus.STATUS_PENDING) + { + index--; + continue; + } return command; } }