vrpc 3.10.0 → 3.10.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/vrpc/VrpcAgent.js +5 -1
package/package.json
CHANGED
package/vrpc/VrpcAgent.js
CHANGED
|
@@ -262,7 +262,11 @@ class VrpcAgent extends EventEmitter {
|
|
|
262
262
|
*/
|
|
263
263
|
create ({ className, instance = nanoid(8), args = [], isIsolated = false }) {
|
|
264
264
|
const obj = VrpcAdapter.create({ className, instance, args, isIsolated })
|
|
265
|
-
|
|
265
|
+
// An agent that is not served yet only collects: once the connection
|
|
266
|
+
// stands, the connect handler subscribes every adapter instance and
|
|
267
|
+
// publishes every class info, so a caller may build its full state
|
|
268
|
+
// before going online and "online" then means "complete"
|
|
269
|
+
if (this._client && !this._hasSharedInstance(instance)) {
|
|
266
270
|
this._subscribeToMethodsOfNewInstance(className, instance)
|
|
267
271
|
this._publishClassInfoMessage(className)
|
|
268
272
|
this._publishClassInfoConciseMessage(className)
|