moscajs / aedes

Barebone MQTT broker that can run on any stream server, the node way
MIT License
1.78k stars 232 forks source link

[bug] Ping with no Response #560

Closed Wade-BuildOtto closed 3 years ago

Wade-BuildOtto commented 3 years ago

I have Wyze cam v2 running mqtt and is publishing imaging data, with pings, but they stop publishing eventually, I can't tell that the Ping is getting a response back.

Is this not automatically setup to pingresp?

I tried to manually execute it but it doesn't take a just a cmd: pingresp, it can't take a null topic

qlobber/lib/qlobber.js:601 const r = topic.split(this._separator); TypeError: Cannot read property 'split' of null

robertsLando commented 3 years ago

@Wade-BuildOtto Unfortunally ping cannot be handled in that way:

https://github.com/moscajs/aedes/blob/master/lib/handlers/index.js#L50 https://github.com/moscajs/aedes/blob/master/lib/handlers/ping.js#L8

It's something handled internally. What you could try to do is to subscribe to the ping event to check when a pingreq is received

Wade-BuildOtto commented 3 years ago

I have subscribed to the ping, however I can't verify they are being fulfilled, as the devices stop publishing, and only send pings, which seems like the pingresp is not being sent.

robertsLando commented 3 years ago

I think the problem is not aedes that is not sending pingresp but could be a connection issue or an issue on the devices side