Closed lxe closed 8 years ago
web_1 | /.../node_modules/uber-statsd-client/lib/EphemeralSocket.js:185 web_1 | self._socket.on('error', function onDeadSocketError() { web_1 | ^ web_1 | TypeError: Cannot read property 'on' of undefined web_1 | at Socket.onError (/.../node_modules/uber-statsd-client/lib/EphemeralSocket.js:185:21) web_1 | at Socket.g (events.js:199:16) web_1 | at Socket.emit (events.js:107:17) web_1 | at dgram.js:319:12 web_1 | at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:81:16) web_1 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:17) web_1 | 31 Jul 21:05:33 - [nodemon] app crashed - waiting for file changes before starting...
This happens here: https://github.com/uber/node-statsd-client/blob/master/lib/EphemeralSocket.js#L185
Which is very strange... looks like the handler fires twice, dereferencing the _socket on the first invocation.
Investigating...
Let's fix it by var udpSocket = self._socket to work around mutations
var udpSocket = self._socket
This happens here: https://github.com/uber/node-statsd-client/blob/master/lib/EphemeralSocket.js#L185
Which is very strange... looks like the handler fires twice, dereferencing the _socket on the first invocation.
Investigating...