You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this._host=host;this._port=parseInt(port);/* Create domain in order to catch port binding errors. */constdomain=require('domain').create();domain.on('error',err=>{this._log.warn('bus binding on %s:%d, error: %s',this._host,this._port,err.message);if(err.code==='EADDRINUSE'){this._port++;this._log.warn(`address in use, retrying on port ${this._port}`);setTimeout(()=>{this._bind(callback);},0);return;}this._log.err('this exception is fatal, we cannot continue...');process.exit(1);});/* Try binding in domain. */domain.run(()=>{this._bind(callback);});
_bind is using axon.socket (mode).bind ()
The 'error' server event should be exposed by the public API.
Regards
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hi,
In
sock.js
https://github.com/tj/axon/blob/master/lib/sockets/sock.js#L368 , the'error'
event ofthis.server
is not handled then it's not possible to handle theEADDRINUSE
error for example (when binding on a non-free port).I'm doing ugly thing with
domain
like this:The
'error'
server event should be exposed by the public API.Regards
The text was updated successfully, but these errors were encountered: