Skip to content

Commit bc20b61

Browse files
committed
adding timeout for giving time to local binary to send kill signal to railsApp
1 parent b02cf14 commit bc20b61

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/Local.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,17 @@ function Local(){
260260
if(childPids.length === 0) {
261261
clearInterval(killChecker);
262262
process.kill(this.pid);
263-
this.isProcessRunning = false;
264-
callback();
263+
264+
// This gives time to local binary to send kill signal to railsApp.
265+
setTimeout(() => {
266+
this.isProcessRunning = false;
267+
callback();
268+
}, 2000);
265269
}
266270
for(var i in childPids) {
267-
try{
271+
try {
268272
process.kill(childPids[i]);
269-
}catch(err){
273+
} catch(err) {
270274
childPids.splice(i, 1);
271275
}
272276
}

0 commit comments

Comments
 (0)