mirror of
https://github.com/deavmi/doap
synced 2024-07-04 15:50:15 +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
|
// Shutdown the messaging layer
|
||||||
this.messaging.close();
|
this.messaging.close();
|
||||||
|
|
||||||
// TODO: We must wake up other sleeprs with an error
|
// Cancel all active request futures
|
||||||
// (somehow, pass it in, flag set)
|
this.requestsLock.lock();
|
||||||
|
foreach(CoapRequest curReq; outgoingRequests)
|
||||||
|
{
|
||||||
|
curReq.future.cancel();
|
||||||
|
}
|
||||||
|
this.requestsLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user