brightcove / hot-shots

Node.js client for statsd, DogStatsD, and Telegraf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCP protocol does not try to reconnect

FINDarkside opened this issue · comments

I suppose this isn't intended given that uds seems to have such feature? When I restart telegraf instance, hot-shots never tries to make a new connection. It just keeps getting the same error over and over again

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:451:14)
    at Object.send (C:\Users\User\monitor_test\node_modules\hot-shots\lib\transport.js:36:14)
    at Client.sendMessage (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsd.js:385:17)
    at Client._send (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsd.js:300:12)
    at Client.send (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsd.js:277:8)
    at Client.sendStat (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsd.js:254:8)
    at Client.sendAll (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsd.js:230:10)
    at Client.increment (C:\Users\User\monitor_test\node_modules\hot-shots\lib\statsFunctions.js:114:10)
    at asd (C:\Users\User\monitor_test\src\index.js:17:20) {
  code: 'EPIPE'
}

Can you use the built-in error handling functionality to reset if this does happen? But yes it does make sense to have a feature to allow for reconnection automatically.