bdy 1.22.5-dev → 1.22.6-dev

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,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.5-dev",
4
+ "version": "1.22.6-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -51,15 +51,18 @@ class AgentManagerClass {
51
51
  }
52
52
  start(id, host, token, port, onProcessExit = () => { }) {
53
53
  const onExit = () => {
54
+ logger_1.default.info('exit manager');
54
55
  onProcessExit();
55
56
  if (this.ws) {
57
+ logger_1.default.info('close websocket');
56
58
  this.ws.clients.forEach((client) => client.terminate());
57
59
  this.ws.close();
58
60
  }
59
61
  if (this.server) {
62
+ logger_1.default.info('close server');
60
63
  this.server.closeAllConnections();
61
64
  this.server.close(() => {
62
- process.exit();
65
+ process.exit(0);
63
66
  });
64
67
  }
65
68
  setTimeout(() => process.exit(0), 1000);
@@ -549,6 +552,7 @@ class AgentManagerClass {
549
552
  this.ws.on('connection', (con, id) => this.processWebsocketConnection(con, id));
550
553
  this.server.on('upgrade', (req, socket, head) => this.processUpgrade(req, socket, head));
551
554
  this.server.on('error', async (err) => {
555
+ logger_1.default.info(err);
552
556
  if (err.code === 'EADDRINUSE') {
553
557
  await this.disableAgentAndExit(texts_1.LOG_ERROR_STARTING_AGENT_SERVER);
554
558
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.5-dev",
4
+ "version": "1.22.6-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {