Closed hicaro closed 7 years ago
How should this error be handled?
When it happens, instead of printing it out to the console, a .emit("error", ...)
could be used.
Then, inside the user's code it could be caught and treated the way he/she prefers:
// fired when a message is received
server.on('error', function(error) {
// do whatever with the it
});
By the way, thank you so much for the library!
would you mind sending a PR?
Will do!
Thanks.
After the TLS certificate used by the broker expired,
mosca
started to not treat the following error properly when a client attempts to connect:The broker does not crash, however it prints the message out at every new connection attempt. Ater renewing the certificate, it stopped.