GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — fix(ws): fail in-flight queries when the connection drops or times out by Gioee · Pull Request #284 · sqlitecloud/sqlitecloud-js Conversation
Member
Fixes #283 ProblemOn the WebSocket transport,
The result is a A side effect of calling the connect callback a second time is that the base Fix (
|
| Payload | main |
this branch |
|---|---|---|
| 5 MB | pending after 30 s | rejected ERR_CONNECTION_ENDED (transport error) in ~1.8 s |
| 20 MB | pending after 30 s | rejected ERR_CONNECTION_ENDED (transport error) in ~2.8 s |
| 80 MB | pending after 30 s | rejected ERR_CONNECTION_TIMEOUT (test config timeout 10 s) |
connection-ws, blob-transport, database, statement and utilities test suites pass.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
On the WebSocket transport a query waits for the socket.io ack of 'GET /v2/weblite/sql'. When the socket disconnected mid-query the ack never fired and the error was only sent to the connect callback, which had already run, so the query promise stayed pending forever. - track the commands waiting for an ack and fail them with the disconnect/connection error when the socket goes away or close() is called - report the connect callback only once, for the outcome of the connection attempt - honour config.timeout on the WebSocket transport too Fixes #283
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #284 +/- ## ========================================== + Coverage 85.23% 85.71% +0.47% ========================================== Files 11 11 Lines 1131 1155 +24 Branches 374 375 +1 ========================================== + Hits 964 990 +26 + Misses 167 153 -14 - Partials 0 12 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
WebSocket: a dropped connection leaves the in-flight query pending forever
There was an error while loading. Please reload this page.