CoapClient

- When `close()` is called we will unblock all active `get()` calls to futures
This commit is contained in:
Tristan B. Velloza Kildaire 2023-09-22 19:06:06 +02:00
parent e790cf2ec0
commit d659c2348b

View File

@ -111,8 +111,13 @@ public class CoapClient
// Shutdown the messaging layer
this.messaging.close();
// TODO: We must wake up other sleeprs with an error
// (somehow, pass it in, flag set)
// Cancel all active request futures
this.requestsLock.lock();
foreach(CoapRequest curReq; outgoingRequests)
{
curReq.future.cancel();
}
this.requestsLock.unlock();
}
/**