@live-change/dao 0.8.9 → 0.8.11

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.
@@ -414,7 +414,13 @@ class ReactiveServerConnection extends EventEmitter {
414
414
  for(let observation of this.observations.values()) {
415
415
  if(observation.observed) observation.dispose()
416
416
  }
417
- if(this.dao) this.dao.dispose()
417
+
418
+ //console.log("SERVER ON CONNECTION CLOSE!", this.dao)
419
+ if(this.dao) {
420
+ this.dao.dispose()
421
+ } else if(this.daoPromise) {
422
+ this.daoPromise.then(dao => this.dao.dispose())
423
+ }
418
424
  this.server.handleConnectionClose(this)
419
425
  })
420
426
 
package/package.json CHANGED
@@ -35,6 +35,6 @@
35
35
  "scripts": {
36
36
  "test": "NODE_ENV=test tape tests/*"
37
37
  },
38
- "version": "0.8.9",
39
- "gitHead": "362dd55bd2773195e4cefd84080c10bd9fbaaf45"
38
+ "version": "0.8.11",
39
+ "gitHead": "c69f8c0c5b1f9c8b62d74bd44e97dccbdc789c5a"
40
40
  }