add fallback for piggybackTimeout of zero
This commit is contained in:
parent
80b7b9cee9
commit
6534db8ed2
@ -355,7 +355,11 @@ public class CoapTransportResource extends AbstractCoapTransportResource {
|
|||||||
* Essentially this allows the use of piggybacked responses.
|
* Essentially this allows the use of piggybacked responses.
|
||||||
*/
|
*/
|
||||||
private void deferAccept(CoapExchange exchange) {
|
private void deferAccept(CoapExchange exchange) {
|
||||||
|
if (piggybackTimeout > 0) {
|
||||||
transportContext.getScheduler().schedule(exchange::accept, piggybackTimeout, TimeUnit.MILLISECONDS);
|
transportContext.getScheduler().schedule(exchange::accept, piggybackTimeout, TimeUnit.MILLISECONDS);
|
||||||
|
} else {
|
||||||
|
exchange.accept();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private UUID toSessionId(TransportProtos.SessionInfoProto sessionInfoProto) {
|
private UUID toSessionId(TransportProtos.SessionInfoProto sessionInfoProto) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user