Open TomazCebekAstron opened 1 year ago
Hi @TomazCebekAstron Thanks for the report. We will try to fix it in the recent versions.
If this is purely done as a broker ping status check functionality? Then why do I need to send client id and token?
This is not intended as a check for the Broker alive status. Since EMQX maintains some resources for this client ID in connection mode, this heartbeat command is to tell the Broker that this CoAP client is still working and DON'T release the related resources.
What happened?
I did a test of the coap gateway. I connected a client (connected mode) by the connect packet on my emqx broker and everything was working from subscribe to publish and heartbeat. I had a client active for 10 minutes (heartbeat settings set to 300s on coap gateway). After this the heartbeat system on my client was still receiving positive confirmation to my heartbeat packets. Meanwhile on the emqx broker the client was already terminated.
heartbeat (hex): 40030027b46d7174740a636f6e6e656374696f6e4d0b636c69656e7469643d3836303031363034303633323333380d03746f6b656e3d34303432353939303730 response (hex): 60440027 <= 2.04 response code
What did you expect to happen?
If the client was terminated from the gateway, then the gateway should respond with a reset response to my heartbeat packet not with an acknowledge + code 2.04 packet... received (hex): 60440027 <= acknowledge + 2.04 response code expected result(hex): 70440027 reset + 2.04 response code (with this it will notify that the client registration expired and it should reconnect to the server with a connection packet)
How can we reproduce it (as minimally and precisely as possible)?
Just send my pdu or any heartbeat packet to the broker... The coap gateway always responds with confirmation... (No prior connection registration is needed...)
Anything else we need to know?
If this is purely done as a broker ping status check functionality? Then why do I need to send client id and token? From my understanding this should be a heartbeat of the client-server connection status. Not a broker ping like behaviour...
EMQX version
OS version
Log files