vona-core 5.0.96 → 5.0.97

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.
@@ -1,4 +1,3 @@
1
- import cluster from 'node:cluster';
2
1
  import { EnumAppEvent } from "../../types/index.js";
3
2
  import { BeanSimple } from "../bean/beanSimple.js";
4
3
  import { AppLocale, BeanScopeContainer } from "../bean/index.js";
@@ -94,17 +93,13 @@ export class AppMeta extends BeanSimple {
94
93
  return this[SymbolClosePromise];
95
94
  }
96
95
  async _closeInner() {
97
- if (this.app.meta.env.SERVER_WORKERS !== '1') {
98
- // disconnect
99
- cluster.worker?.disconnect();
100
- }
101
- else {
102
- // close server
103
- if (this.app.server) {
104
- this.app.server.close();
105
- // maybe hang up using await
106
- // await promisify(this.app.server.close).call(this.app.server);
107
- }
96
+ // should not call disconnect, which will cause channel closed
97
+ // cluster.worker?.disconnect();
98
+ // close server
99
+ if (this.app.server) {
100
+ this.app.server.close();
101
+ // maybe hang up using await
102
+ // await promisify(this.app.server.close).call(this.app.server);
108
103
  }
109
104
  // appClose
110
105
  this.appClose = true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-core",
3
3
  "type": "module",
4
- "version": "5.0.96",
4
+ "version": "5.0.97",
5
5
  "description": "vona",
6
6
  "publishConfig": {
7
7
  "access": "public"