-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: _disconnect
causes uncaught exception and process to crash if using ws
library
#197
Comments
You can see the code here from
|
How do you call _disconnect? this error seems to happen when you manually invoke |
@bytemain This gets invoked when you call |
Actually what is probably better is to check if |
but when |
The logic that throws this error results from checking if it is equal to CONNECTING as mentioned already. Please see the code here https://github.com/websockets/ws/blob/0d1b5e6c4acad16a6b1a1904426eb266a5ba2f72/lib/websocket.js#L290-L294. Therefore, it is is NOT connecting, |
why? we actually need abort connection that is connecting, because here we are reconnecting, if dont abort it, we will have orphen conection |
It seems to throw an uncaught exception if you try to call |
…reconnecting-websocket (as previous package no longer maintained), increased SQLite busy_timeout from 15s to 30s, added courtesy email to customers if they are attempting to use IMAP/POP3 but do not have IMAP enabled on the alias yet (once a week), added _disconnect fix per <pladaria/reconnecting-websocket#197> (otherwise exception is thrown and process restarts), fixed spam/junk/trash check, added analysis_limit=400 to speed up pragma optimize, fixed POP3 exception with writeStream, fixed SEARCH bug of SqliteError - too many SQL variables due to SQLITE_MAX_VARIABLE_NUMBER max of 999, fixed RangeError: Maximum call stack size exceeded with msgpackr and Error objects, fixed payload.id missing for backups, only check for backups during read operation such as GETQUOTAROOT on SQLite server only, sync tmp with db every time user attempts to fetch mail (once every 10s)
@bytemain just making sure you saw my comment here opensumi#10 (comment) Thank you! 🙏 🙇 😄 |
There is a bug in the codebase right now in that
_disconnect
is invoked which subsequently callsthis._ws.close
. Despite there being a try/catch wrapper, if you use thews
library, an exception is thrown and your process will exit.cc @bytemain @abdelmagied94 @Zerounary can you please merge this fix into your library at https://github.com/opensumi/reconnecting-websocket for the npm package
@opensumi/reconnecting-websocket
and patch version bump and publish to npm afterwards to v4.4.1 (it currently on v4.4.0)The text was updated successfully, but these errors were encountered: