From c16b8a4b06ef54d149f0d72af9bd57c30a5ddd15 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 15 Oct 2023 17:03:45 +0200 Subject: [PATCH] Client - `newMid2()` now uses the updated `findNextFree(..., ...)` from niknaks --- source/doap/client/client.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/doap/client/client.d b/source/doap/client/client.d index 01157c8..7f827cd 100644 --- a/source/doap/client/client.d +++ b/source/doap/client/client.d @@ -132,7 +132,12 @@ public class CoapClient // If none was available for re-use then find next available // ... free and use that (also don't forget to register it) - ushort newMid = findNextFree(inUse); + ushort newMid; + bool gotAvailable = findNextFree(inUse, newMid); + + // FIXME: Add a thing which does something + // ... if `gotAvailable` is false + this.mids[newMid] = StopWatch(AutoStart.yes); return newMid;