dashersw/cote

Socket error

dreambit opened this issue · 3 comments

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND bro-ms-pc565 bro-ms-pc565:8000
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
Emitted 'error' event at:
    at Socket.<anonymous> (C:\projects\photon\node_modules\@dashersw\axon\lib\sockets\sock.js:199:49)
    at Socket.emit (events.js:189:13)
    at Socket.EventEmitter.emit (domain.js:441:20)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

How to handle socket errors?

For requester, responder, publisher or subscriber you can do component.sock.on('error', cb).

@dashersw What about redis error?
How to handle it?
Thanks

@dreambit it's a little tricky, but you can access it through requester.discovery.broadcast.socket.sub.on('error', err => console.log(err)) where requester is any cote component.