mirror of
https://github.com/deavmi/doap
synced 2024-07-04 14:50:54 +02:00
CoapClient
- When `close()` is called we will unblock all active `get()` calls to futures
This commit is contained in:
parent
e790cf2ec0
commit
d659c2348b
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user