[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated (883788565 -> d985c0ba0)
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated (883788565 -> d985c0ba0) |
Date: |
Mon, 27 May 2024 21:48:36 +0200 |
This is an automated email from the git hooks/post-receive script.
ivan-avalos pushed a change to branch master
in repository wallet-core.
from 883788565 wallet-core: ensure DB is open before handling request
new a976b03cd taler-util: cancel http requests via os.fetchHttp
new d985c0ba0 taler-util: remove request id parameter from cancelFn
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
packages/taler-util/src/http-impl.qtart.ts | 6 +++++-
packages/taler-util/src/qtart.ts | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/taler-util/src/http-impl.qtart.ts
b/packages/taler-util/src/http-impl.qtart.ts
index b4e4ebbe7..f60c82fc3 100644
--- a/packages/taler-util/src/http-impl.qtart.ts
+++ b/packages/taler-util/src/http-impl.qtart.ts
@@ -118,7 +118,10 @@ export class HttpLibImpl implements HttpRequestLibrary {
// Just like WHATWG fetch(), the qjs http client doesn't
// really support cancellation, so cancellation here just
// means that the result is ignored!
- const fetchProm = qjsOs.fetchHttp(url, {
+ const {
+ promise: fetchProm,
+ cancelFn
+ } = qjsOs.fetchHttp(url, {
method,
data,
headers: headersList,
@@ -135,6 +138,7 @@ export class HttpLibImpl implements HttpRequestLibrary {
if (opt?.cancellationToken) {
cancelCancelledHandler = opt.cancellationToken.onCancelled(() => {
+ cancelFn();
cancelPromCap.reject(new RequestCancelledError());
});
}
diff --git a/packages/taler-util/src/qtart.ts b/packages/taler-util/src/qtart.ts
index e298a157c..6a5984973 100644
--- a/packages/taler-util/src/qtart.ts
+++ b/packages/taler-util/src/qtart.ts
@@ -17,7 +17,10 @@ export interface QjsHttpOptions {
}
export interface QjsOsLib {
- fetchHttp(url: string, options?: QjsHttpOptions): Promise<QjsHttpResp>;
+ fetchHttp(url: string, options?: QjsHttpOptions): {
+ promise: Promise<QjsHttpResp>,
+ cancelFn: () => number,
+ };
postMessageToHost(s: string): void;
setMessageFromHostHandler(h: (s: string) => void): void;
rename(oldPath: string, newPath: string): number;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (883788565 -> d985c0ba0),
gnunet <=