diff --git a/leshan-core/src/main/java/leshan/server/lwm2m/resource/RegisterResource.java b/leshan-core/src/main/java/leshan/server/lwm2m/resource/RegisterResource.java index 4b4a994a..133de85c 100644 --- a/leshan-core/src/main/java/leshan/server/lwm2m/resource/RegisterResource.java +++ b/leshan-core/src/main/java/leshan/server/lwm2m/resource/RegisterResource.java @@ -164,6 +164,7 @@ public void handlePOST(CoapExchange exchange) { if (securityInfo != null) { LOG.warn("client {} must connect using DTLS PSK", endpoint); exchange.respond(ResponseCode.BAD_REQUEST, "Client must connect thru DTLS (port 5684)"); + return; } }