Browse Source
add fallback for piggybackTimeout of zero
pull/6522/head
Jan Christoph Bernack
4 years ago
No known key found for this signature in database
GPG Key ID: BD807E5761329D0A
1 changed files with
5 additions and
1 deletions
-
common/transport/coap/src/main/java/org/thingsboard/server/transport/coap/CoapTransportResource.java
|
|
|
@ -355,7 +355,11 @@ public class CoapTransportResource extends AbstractCoapTransportResource { |
|
|
|
* Essentially this allows the use of piggybacked responses. |
|
|
|
*/ |
|
|
|
private void deferAccept(CoapExchange exchange) { |
|
|
|
transportContext.getScheduler().schedule(exchange::accept, piggybackTimeout, TimeUnit.MILLISECONDS); |
|
|
|
if (piggybackTimeout > 0) { |
|
|
|
transportContext.getScheduler().schedule(exchange::accept, piggybackTimeout, TimeUnit.MILLISECONDS); |
|
|
|
} else { |
|
|
|
exchange.accept(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private UUID toSessionId(TransportProtos.SessionInfoProto sessionInfoProto) { |
|
|
|
|