Skip to content

Commit

Permalink
Merge pull request #307 from martynsmith/jirwin/add-debug-network-error
Browse files Browse the repository at this point in the history
Log net connection errors. Thanks Trinitas.
  • Loading branch information
Chris Nehren committed Jan 14, 2015
2 parents 98f2bd0 + 9da005f commit df3af44
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 @@ -789,6 +789,9 @@ Client.prototype.connect = function(retryCount, callback) {
});
self.conn.addListener('error', function(exception) {
self.emit('netError', exception);
if (self.opt.debug) {
util.log('Network error: ' + exception);
}
});
};
Client.prototype.disconnect = function(message, callback) {
Expand Down

0 comments on commit df3af44

Please sign in to comment.