-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Use case: When the port is already in use (for example in 9856), the library throws an uncaughtException. This prevents the upstream consumer from further handling the error.
Proposed fix is to add following error handler after
Lines 168 to 170 in c0271a6
httpOrHttpsServer.listen(port, function () { | |
resolve(getReloadReturn()) | |
}) |
httpOrHttpsServer.on('error', function(error) {
reject(error);
});
Reference:
https://stackoverflow.com/a/14470248