substack/dnode — pull request #77 by guybrush (2011-12-02 19:00:07+00:00)
Title: emit 'refused' on `this`

this will not work, since the connection never gets established

// nothing is listening on 4444
dnode.connect(4444,{reconnect:100},function(remote,conn){
conn.on('refused',function(){console.log('refused')})
})

in fact the 'refused' event will never be emitted, since attachDnode() will not be called because there wont be a stream-event 'connect' - right?

so i thought it would be best to emit 'refused' on `this`, or maybe just emit the error `this.emit('error',err)`?

note: the readme would have to be updated too