From 6a2f278dd17d976dc7fc729c3f5e31cf685d1e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Tue, 27 Sep 2022 10:18:01 +0200 Subject: [PATCH] Fixed negative queued msges - version count up --- MewtocolNet/Mewtocol/MewtocolInterface.cs | 5 ++++- MewtocolNet/MewtocolNet.csproj | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MewtocolNet/Mewtocol/MewtocolInterface.cs b/MewtocolNet/Mewtocol/MewtocolInterface.cs index cbf58c5..543ddf4 100644 --- a/MewtocolNet/Mewtocol/MewtocolInterface.cs +++ b/MewtocolNet/Mewtocol/MewtocolInterface.cs @@ -733,8 +733,11 @@ namespace MewtocolNet { try { queuedMessages++; + var response = await queue.Enqueue(() => SendSingleBlock(_msg)); - queuedMessages--; + + if (queuedMessages > 0) + queuedMessages--; if (response == null) { return new CommandResult { diff --git a/MewtocolNet/MewtocolNet.csproj b/MewtocolNet/MewtocolNet.csproj index 68d208c..6c18f57 100644 --- a/MewtocolNet/MewtocolNet.csproj +++ b/MewtocolNet/MewtocolNet.csproj @@ -2,7 +2,7 @@ netstandard2.0 MewtocolNet - 0.5.8 + 0.6.0 Felix Weiss Womed true