bdy 1.9.36-stage → 1.9.37-beta

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.9.36-stage",
4
+ "version": "1.9.37-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -16,6 +16,7 @@ class SshClient extends events_1.default {
16
16
  this.username = username;
17
17
  this.password = password;
18
18
  this.keepalive = false;
19
+ logger_js_1.default.debug(`New ssh client: ${username}:${password}@${ip}:${port}`);
19
20
  }
20
21
  async open() {
21
22
  return new Promise((resolve, reject) => {
@@ -39,7 +40,7 @@ class SshClient extends events_1.default {
39
40
  hmac: ['hmac-sha2-256-etm@openssh.com'],
40
41
  kex: ['ecdh-sha2-nistp256'],
41
42
  },
42
- keepaliveInterval: 30000,
43
+ keepaliveInterval: 10000,
43
44
  host: this.ip,
44
45
  port: this.port,
45
46
  username: this.username,
@@ -158,16 +159,20 @@ class SshClient extends events_1.default {
158
159
  this.close();
159
160
  }
160
161
  openKeepAlive() {
162
+ logger_js_1.default.debug(`SSH client open`);
161
163
  this.keepalive = true;
162
164
  this.open()
163
165
  .then(() => {
166
+ logger_js_1.default.debug(`SSH client opened`);
164
167
  this.emit(utils_1.SSH_CLIENT_EVENT_CONNECTED);
165
168
  this.client.on('close', () => {
169
+ logger_js_1.default.debug(`SSH client closed`);
166
170
  if (this.keepalive)
167
171
  this.openKeepAlive();
168
172
  });
169
173
  })
170
174
  .catch(() => {
175
+ logger_js_1.default.debug(`SSH client closed`);
171
176
  this.emit(utils_1.SSH_CLIENT_EVENT_DISCONNECTED);
172
177
  setTimeout(() => {
173
178
  if (this.keepalive)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.9.36-stage",
4
+ "version": "1.9.37-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {