Skip to content

Commit

Permalink
Add error handler for net connection problems such as invalid server …
Browse files Browse the repository at this point in the history
…name.
  • Loading branch information
akavlie committed Nov 30, 2011
1 parent 36a84c1 commit 6d6114a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ Client.prototype.connect = function ( retryCount, callback ) { // {{{
self.connect( retryCount + 1 );
}, self.opt.retryDelay );
});
self.conn.addListener("error", function(exception) {
self.emit("netError", exception);
});
}; // }}}
Client.prototype.disconnect = function ( message, callback ) { // {{{
if ( typeof(message) === 'function' ) {
Expand Down

0 comments on commit 6d6114a

Please sign in to comment.