Open gnought opened 4 years ago
the returned subscription currently is checked, !sub || typeof sub !== 'object', it is better to validate also if it matches { topic: 'xxx', qos; [0|1|2|128] }
!sub || typeof sub !== 'object'
{ topic: 'xxx', qos; [0|1|2|128] }
https://github.com/moscajs/aedes/blob/master/lib/handlers/subscribe.js#L88 https://github.com/moscajs/aedes/blob/master/lib/handlers/subscribe.js#L110
the returned subscription currently is checked,
!sub || typeof sub !== 'object'
, it is better to validate also if it matches{ topic: 'xxx', qos; [0|1|2|128] }