wzr1337 / rsi.server

This project implements the Volkswagen Infotainment Web Interface as published under https://www.w3.org/Submission/2016/01/. The viwi is now called RESTful service interface (rsi)
MIT License
62 stars 18 forks source link

handle ECONNRESET gracefully #78

Closed wzr1337 closed 6 years ago

wzr1337 commented 6 years ago

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

Error: read ECONNRESET at _errnoException (util.js:1024:11) at TCP.onread (net.js:615:25)

wzr1337 commented 6 years ago

fixed: https://github.com/wzr1337/rsi.server/tree/0.2.2

ghost commented 6 years ago

console.log, why not console.error?

wzr1337 commented 6 years ago

Should be rather this.logger.error()

We must be aware of scope change when the handler is called... 'This' will point to the websocket itself

Be aware when you PR 😜 --

ghost commented 6 years ago

I guess TS supports .bind() to tame the this beast ;-)

wzr1337 commented 6 years ago

Go for it :D

Easy catch --