moscajs / aedes

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

[bug] console.error introduced in v0.51.0 #951

Closed simonnilsson closed 2 months ago

simonnilsson commented 2 months ago

System Information

Describe the bug The commit e1ee60c added a console.error log to init function in connect.js, this outputs all errors to console that should ideally only be be returned in the done callback. This change was released in 0.51.0.

To Reproduce Steps to reproduce the behavior:

  1. Start aedes server 2a. Connect with protocol 3.1.0 with a client-id longer than 23 characters. 2b. Connect with protocol 5.0 client. 2c. Have a keepaliveLimit set and use a longer keepalive in client.

Expected behavior Done should be called with the error. No log output should be produced.

Additional context To prevent this I would recommend not allowing console.* during linting.

robertsLando commented 2 months ago

Fixed by #952