From d37b91e94ccd170677da2b5eb91e9976b657604f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 4 Jan 2020 04:05:09 -0600 Subject: [PATCH] Update telnet-service.js --- app/core/telnet-service.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/core/telnet-service.js b/app/core/telnet-service.js index da194e7..29c7204 100644 --- a/app/core/telnet-service.js +++ b/app/core/telnet-service.js @@ -29,7 +29,7 @@ module.exports = { * TCP ping first, respond with error * @type {any | void} */ - const ping = await tcpping({address: '127.0.0.1', port: 9000, timeout: 500, attempts: 1}); + const ping = await tcpping({ address: '127.0.0.1', port: 9000, timeout: 500, attempts: 1 }); if (!ping.avg) { return false; } @@ -46,7 +46,7 @@ module.exports = { shellPrompt: '>', timeout: 1000, execTimeout: 1000, - maxBufferLength: '10M', + maxBufferLength: '10M' } ); @@ -58,7 +58,7 @@ module.exports = { } ); - worldConnection.send("quit", { + worldConnection.send('quit', { waitfor: 'Connection closed by foreign host$', maxBufferLength: '10M' } @@ -66,7 +66,7 @@ module.exports = { worldConnection.destroy(); - return worldResponse.replace("\n\r>", "").trim(); + return worldResponse.replace('\n\r>', '').trim(); }, /** @@ -99,7 +99,7 @@ module.exports = { shellPrompt: '>', timeout: 1000, execTimeout: 1000, - maxBufferLength: '10M', + maxBufferLength: '10M' } ); @@ -111,7 +111,7 @@ module.exports = { } ); - zoneConnection[port].send("quit", { + zoneConnection[port].send('quit', { waitfor: 'Connection closed by foreign host$', maxBufferLength: '10M' } @@ -119,11 +119,11 @@ module.exports = { zoneConnection[port].destroy(); - return zoneResponse.replace("\n\r>", "").trim(); + return zoneResponse.replace('\n\r>', '').trim(); } catch (error) { console.log(error); } - }, -}; \ No newline at end of file + } +};