From 95673cf21f87ad44f79af506cb98e88e742190e9 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 25 Sep 2023 17:15:40 +0200 Subject: [PATCH] CoapClient - `yankRequest(ubyte[] token)` now will also remove the matched `CoapRequest` from the `outgoingRequests` queue - Fixes #6 --- source/doap/client/client.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/doap/client/client.d b/source/doap/client/client.d index b85ffee..b0e125a 100644 --- a/source/doap/client/client.d +++ b/source/doap/client/client.d @@ -181,7 +181,9 @@ public class CoapClient /** * Given a token this will try and find an active - * request with a matching token and return it + * request with a matching token and return it. + * + * This will also remove it from the requests queue. * * Params: * token = the token @@ -200,7 +202,8 @@ public class CoapClient { foundRequest = request; - // FIXME: We should remove it here? + outgoingRequests.linearRemoveElement(foundRequest); + break; } }