@nxtedition/deepstream.io-client-js 23.4.20 → 23.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -345,7 +345,9 @@ class RecordHandler {
|
|
|
345
345
|
if (idx < args.length && (args[idx] == null || typeof args[idx] === 'object')) {
|
|
346
346
|
const options = args[idx++] || {}
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
if (options.signal != null) {
|
|
349
|
+
signal = options.signal
|
|
350
|
+
}
|
|
349
351
|
|
|
350
352
|
if (options.timeout != null) {
|
|
351
353
|
timeoutValue = options.timeout
|
|
@@ -391,6 +393,10 @@ class RecordHandler {
|
|
|
391
393
|
let prevData = kEmpty
|
|
392
394
|
|
|
393
395
|
const onUpdate = (record) => {
|
|
396
|
+
if (signal?.aborted) {
|
|
397
|
+
o.error(new utils.AbortError())
|
|
398
|
+
}
|
|
399
|
+
|
|
394
400
|
if (state && record.state < state) {
|
|
395
401
|
return
|
|
396
402
|
}
|
|
@@ -436,15 +442,8 @@ class RecordHandler {
|
|
|
436
442
|
onUpdate(record)
|
|
437
443
|
}
|
|
438
444
|
|
|
439
|
-
const abort = () => {
|
|
440
|
-
o.error(new utils.AbortError())
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
signal?.addEventListener('abort', abort)
|
|
444
|
-
|
|
445
445
|
return () => {
|
|
446
446
|
record.unsubscribe(onUpdate).unref()
|
|
447
|
-
signal?.removeEventListener('abort', abort)
|
|
448
447
|
}
|
|
449
448
|
})
|
|
450
449
|
}
|
|
@@ -78,7 +78,7 @@ class Listener {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (value$) {
|
|
81
|
-
const subscription = value$.subscribe({
|
|
81
|
+
const subscription = value$.pipe(this._pipe).subscribe({
|
|
82
82
|
next: (data) => {
|
|
83
83
|
const version = `INF-${this._connection.hasher.h64ToString(data)}`
|
|
84
84
|
this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [name, version, data])
|