ZeroNetJS / zeronet-js

ZeroNet in JS
MIT License
48 stars 9 forks source link

Catch ECONNRESET errors #99

Closed mkg20001 closed 6 years ago

mkg20001 commented 6 years ago

OS: linux

Bundle: git

Steps to Reproduce:

  1. Start the node
  2. Leave it running for a few hours
  3. It should crash eventually

Affected Component(s): protocol, swarm, crypto

Expected Results:

The connection causing the ECONNRESET error gets dropped

Actual Results:

ZeroNetJS crashes

Other information:

  zeronet:protocol:handshake Finished handshake { isServer: true } +1ms
  zeronet:protocol:client:handshake appending => /ip4/94.97.1.134/tcp/19373 leftover bytes 0 +0ms
  zeronet:crypto upgrading to crypto tls-rsa +0ms
  zeronet:crypto:tls tls init rsa { isServer: true } +1ms
  zeronet:crypto:tls tls success? null +454ms
  zeronet:crypto crypto finished { isServer: true } +0ms
  zeronet:protocol:client initializing =>  +1ms
  zeronet:protocol finished upgrade { isServer: true } +0ms
Error: read ECONNRESET
    at _errnoException (util.js:1024:11)
    at TCP.onread (net.js:618:25)
[2017-10-27T16:34:40.131Z] FATAL: zeronet:node/2301 on maciej-pc: FATAL ERROR
[2017-10-27T16:34:40.134Z] FATAL: zeronet:node/2301 on maciej-pc: read ECONNRESET (err.code=ECONNRESET)
    Error: read ECONNRESET
        at _errnoException (util.js:1024:11)
        at TCP.onread (net.js:618:25)

Happens after tls-rsa was added

mkg20001 commented 6 years ago

Closing for now. Should be fixed with the new swarm.