In case of the use of mosca embedded in another program, an unhandled exception causes the main program to fail. Currently, this prevents node-red from being started if a port is already in use. With this change the exception can be caught with server.on('error', ...
I added a unit test as required.
In case of the use of mosca embedded in another program, an unhandled exception causes the main program to fail. Currently, this prevents node-red from being started if a port is already in use. With this change the exception can be caught with server.on('error', ... I added a unit test as required.