asticode / astilectron

Electron app that provides an API over a TCP socket that allows executing Electron's method as well as capturing Electron's events
MIT License
285 stars 67 forks source link

Prevent Uncaught Exception caused by TCP Error #43

Closed scottkipferOlive closed 3 years ago

scottkipferOlive commented 3 years ago

In our application we occasionally encounter an Uncaught Exception due to an ECONNRESET error when the tcp connection between the client and the main electron process is lost.

Write -> image

Read -> image

In order to prevent this from being shown to the end user we are suggesting that this error be suppressed. Since the socket "close" event will be fired immediately after the socket "error" event, process.exit() will be called as soon as there is an error with the tcp connection. We are open to other methods of suppressing this exception or adding this as configuration functionality.

asticode commented 3 years ago

FYI I've created a v0.46.0 tag