@nxtedition/deepstream.io-client-js 25.1.0 → 25.1.1
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 +1 -1
- package/src/record/record.js +15 -9
package/package.json
CHANGED
package/src/record/record.js
CHANGED
|
@@ -251,7 +251,7 @@ class Record {
|
|
|
251
251
|
onDone(
|
|
252
252
|
Object.assign(new Error(`timeout ${this.name} [${current}<${expected}]`), {
|
|
253
253
|
code: 'ETIMEDOUT',
|
|
254
|
-
})
|
|
254
|
+
}),
|
|
255
255
|
)
|
|
256
256
|
}, timeout)
|
|
257
257
|
}
|
|
@@ -392,7 +392,7 @@ class Record {
|
|
|
392
392
|
this._version = nextVersion
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
_onUpdate([, version, data
|
|
395
|
+
_onUpdate([, version, data]) {
|
|
396
396
|
const prevData = this._data
|
|
397
397
|
const prevVersion = this._version
|
|
398
398
|
const prevState = this._state
|
|
@@ -425,11 +425,17 @@ class Record {
|
|
|
425
425
|
this._onPatching(false)
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
this._state
|
|
429
|
-
? C.RECORD_STATE.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
428
|
+
if (this._state < C.RECORD_STATE.SERVER) {
|
|
429
|
+
this._state = this._version.charAt(0) === 'I' ? C.RECORD_STATE.STALE : C.RECORD_STATE.SERVER
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// if (hasProvider != null ) {
|
|
433
|
+
// this._state = convertTyped(hasProvider, this._handler._client)
|
|
434
|
+
// ? C.RECORD_STATE.PROVIDER
|
|
435
|
+
// : this._version.charAt(0) === 'I'
|
|
436
|
+
// ? C.RECORD_STATE.STALE
|
|
437
|
+
// : C.RECORD_STATE.SERVER
|
|
438
|
+
// }
|
|
433
439
|
|
|
434
440
|
if (this._state !== prevState || this._data !== prevData || this._version !== prevVersion) {
|
|
435
441
|
this._emitUpdate()
|
|
@@ -475,8 +481,8 @@ class Record {
|
|
|
475
481
|
hasProvider && convertTyped(hasProvider, this._handler._client)
|
|
476
482
|
? C.RECORD_STATE.PROVIDER
|
|
477
483
|
: this._version.charAt(0) === 'I'
|
|
478
|
-
|
|
479
|
-
|
|
484
|
+
? C.RECORD_STATE.STALE
|
|
485
|
+
: C.RECORD_STATE.SERVER
|
|
480
486
|
|
|
481
487
|
if (this._state !== prevState) {
|
|
482
488
|
this._emitUpdate()
|