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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vrpc",
3
- "version": "3.10.0",
3
+ "version": "3.10.1",
4
4
  "description": "Variadic Remote Procedure Calls",
5
5
  "main": "index.js",
6
6
  "directories": {
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
- if (!this._hasSharedInstance(instance)) {
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)