avoid error on cancel (#13)
This commit is contained in:
@@ -39,6 +39,8 @@ export class DuckDBUIClientConnection {
|
|||||||
errorMessage?: string,
|
errorMessage?: string,
|
||||||
failure?: (reason: unknown) => void,
|
failure?: (reason: unknown) => void,
|
||||||
) {
|
) {
|
||||||
|
// Handle the rejected promise (with a no-op) in case nothing else is, to avoid a console error.
|
||||||
|
this.requestQueue.enqueuedResult(id).catch(() => {});
|
||||||
this.requestQueue.cancel(id, errorMessage);
|
this.requestQueue.cancel(id, errorMessage);
|
||||||
// If currently running, then interrupt it.
|
// If currently running, then interrupt it.
|
||||||
if (this.requestQueue.isCurrent(id)) {
|
if (this.requestQueue.isCurrent(id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user