We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be5906 commit 0ee74f2Copy full SHA for 0ee74f2
packages/ipfs-core/src/ipns/routing/dht-datastore.js
@@ -24,13 +24,23 @@ export class DHTDatastore {
24
*/
25
async put (key, value, options) {
26
try {
27
- await drain(this._dht.put(key, value, options))
+ let responses = this._dht.put(key, value, options);
28
+ while(true) {
29
+ let item;
30
+ try {
31
+ item = await responses.next();
32
+ } catch(e) {
33
+ if (e.message != "Query aborted") throw e;
34
+ }
35
+ if (item && item.done) break;
36
37
} catch (/** @type {any} */ err) {
38
log.error(err)
39
throw err
40
}
41
42
43
+
44
/**
45
* @param {Uint8Array} key - identifier of the value to be obtained.
46
* @param {AbortOptions} [options]
0 commit comments