Skip to content

Commit

Permalink
be sure to surface errors from the bootstrap steps
Browse files Browse the repository at this point in the history
  • Loading branch information
esatterwhite committed Dec 24, 2016
1 parent 058085b commit ec53449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class Server extends http.Server {

listen(port, host, backlog, callback) {
this._node.join(null, (err) => {
this._node.handle(( req, res) => {
if (err) return callback(err)
this._node.handle(( req, res ) => {
this._router.handle( req, res );
})
timer.watch('skyring', (err, data) => {
Expand Down
3 changes: 2 additions & 1 deletion lib/server/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class Node extends EventEmitter {
})
});
this._ring.setupChannel();
this._tchannel.listen( this._port, host, ()=> {
this._tchannel.listen( this._port, host, (er)=> {
if(er) return cb(er)
debug('tchannel listening on ', host, this._port);
this._ring.bootstrap(seeds, ( er ) => {
if( er ) return cb(er);
Expand Down

0 comments on commit ec53449

Please sign in to comment.