Comparing version 6.5.7 to 6.5.8
@@ -13,2 +13,3 @@ const { EventEmitter } = require('events') | ||
SESSION_CLOSED, | ||
REQUEST_CANCELLED, | ||
BLOCK_NOT_AVAILABLE | ||
@@ -250,4 +251,6 @@ } = require('hypercore/errors') | ||
opts = { activeRequests: this.activeRequests, valueEncoding: this.valueEncoding, ...opts } | ||
const onwait = autocoreOnWait.bind(this, opts && opts.onwait) | ||
opts = { activeRequests: this.activeRequests, valueEncoding: this.valueEncoding, ...opts, onwait } | ||
// check if we indexed this already | ||
@@ -316,3 +319,4 @@ if (index < this.indexedLength) { | ||
// TODO: clear active requests also! | ||
const core = this.getBackingCore().session | ||
if (core.replicator) core.replicator.clearRequests(this.activeRequests) | ||
@@ -905,1 +909,6 @@ this.emit('close', false) | ||
} | ||
function autocoreOnWait (fn, index, core) { | ||
if (this.closing) throw REQUEST_CANCELLED() | ||
if (fn) return fn(index, this) | ||
} |
{ | ||
"name": "autobase", | ||
"version": "6.5.7", | ||
"version": "6.5.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190025
5111