Open Booster2ooo opened 8 years ago
Hello,
I noticed there isn't anything happening if you try to connect to a server that doesn't exists. I think it should be handled and emit an error event of some kind.
Here is a sample for you to try:
var irc = require('irc') , logger = function logger() { console.log(arguments); } , instance ; process.on('unhandledRejection', logger); process.on('uncaughtException', logger); try { instance = new irc.Client('irc.fake.server', 'myNick', { userName: 'username' , realName: 'real name' , port: 6667 , autoRejoin: true , autoConnect: false , channels: [] , secure: false , selfSigned: false , certExpired: false , stripColors: true , encoding: 'UTF-8' }); instance .addListener('error', logger) .addListener('ping', logger) .addListener('raw', logger) .addListener('close', logger) .addListener('quit', logger) .addListener('kill', logger) ; instance.connect(); } catch (ex) { logger(ex); }
Edit: In fact, it emits the undocumented 'netError' event >> https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L885
Well noticed. The big question ist: Why do we get ECONNREFUSED? I get it the whole time, even thought the server is there and kicking..
Hello,
I noticed there isn't anything happening if you try to connect to a server that doesn't exists. I think it should be handled and emit an error event of some kind.
Here is a sample for you to try:
Edit: In fact, it emits the undocumented 'netError' event >> https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L885