totaljs / framework4

Total.js framework v4
https://www.totaljs.com
Other
99 stars 36 forks source link

WebSocket ECONNABORTED #14

Closed dispbd closed 3 years ago

dispbd commented 3 years ago

This error occurs periodically in the console.

Error: write ECONNABORTED
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:773:11)
    at Socket._write (node:net:785:8)
    at writeOrBuffer (node:internal/streams/writable:395:12)
    at Socket.Writable.write (node:internal/streams/writable:340:10)
    at WebSocketClientProto.ping (C:\Users\dispbd\AppData\Roaming\npm\node_modules\total4\index.js:14680:15)
    at WebSocketProto.ping (C:\Users\dispbd\AppData\Roaming\npm\node_modules\total4\index.js:13894:30)
    at Framework.F.service (C:\Users\dispbd\AppData\Roaming\npm\node_modules\total4\index.js:7311:10)
    at FrameworkCacheProto.recycle (C:\Users\dispbd\AppData\Roaming\npm\node_modules\total4\index.js:10333:4) {
  errno: -4079,
  code: 'ECONNABORTED',
  syscall: 'write'
}

I don't quite understand the reason for it. Perhaps this is due to the fact that socket connections are persistent, and sometimes I see an error after restarting the server. But sometimes the error occurs by itself. All sockets are authorized, perhaps this is somehow related. The important thing is that I did not find any failures either on the client or on the backend! That is, its decision is not urgent at all.

petersirka commented 3 years ago

Hi @dispbd, can you install latest beta version of Total.js framework?

I have added better error handling for WebSocket. Let me know if the problem persists.

dispbd commented 3 years ago

Well, of course; naturally. I have installed. I'll close the issue for now. I'll let you know if the error reappears! As always, thanks for your promptness!