Showing
1 changed file
with
6 additions
and
2 deletions
@@ -72,8 +72,12 @@ class ApiCache { | @@ -72,8 +72,12 @@ class ApiCache { | ||
72 | let self = this; | 72 | let self = this; |
73 | conn.on('ready', async() => { | 73 | conn.on('ready', async() => { |
74 | try { | 74 | try { |
75 | - conn.exec(`sudo kill -9 ${pid}`, (err, stream) => { | ||
76 | - conn.end(); | 75 | + conn.exec(`sudo kill ${pid}`, (err, stream) => { |
76 | + if(err) { | ||
77 | + console.log(err); | ||
78 | + } else { | ||
79 | + console.log(`sudo kill ${pid} --> success`); | ||
80 | + } | ||
77 | }); | 81 | }); |
78 | } catch (e) { | 82 | } catch (e) { |
79 | console.log(e); | 83 | console.log(e); |
-
Please register or login to post a comment