Turntable-API
Turntable-API copied to clipboard
Socket is not writable
at about 1 AM EST I got this error on more than 1 bot
net.js:391
throw new Error('Socket is not writable');
^
Error: Socket is not writable
at Client._writeOut (net.js:391:11)
at Client.write (net.js:377:17)
at [object Object].<anonymous> (/node_modules/ttapi/websocket.js:449:16)
at [object Object]._send (/node_modules/ttapi/bot.js:299:12)
at [object Object].updatePresence (/node_modules/ttapi/bot.js:333:9)
at Timer.callback (/node_modules/ttapi/bot.js:148:47)
not sure if this is due to an interruption by tt or by my server ?
I would appreciate any advice you could give here Mike
I get these every so often. I've always assumed they've been TT errors.
I would use something like forever or supervisor to run them,
because they automatically restart processes when the crash.
Yayramen,
thank you those are good resources. To me though that sounds a like temporary solution. The fact that tt is unavailable shouldn't cause everything to come to a screeching halt. whatever is causing the error instead of throwing an error like that should come come back with a graceful response that can be bubbled up an appropriate point in the decision tree. So that a decision can be made programmatically about what should be done
a) keep trying x times b) skip and try again later
thats just an example.
Mike