fix(linux): fix closing on linux in some cases
This commit is contained in:
parent
dba71624af
commit
a4230874f5
@ -367,3 +367,8 @@ rl.on("SIGINT", function () {
|
||||
process.on("SIGINT", () => {
|
||||
stop()
|
||||
});
|
||||
|
||||
process.on("exit", () => {
|
||||
if(spider)
|
||||
spider.preventNetworkOnExit = true
|
||||
})
|
@ -833,10 +833,13 @@ module.exports = function (send, recive, dataDirectory, version, env)
|
||||
}))
|
||||
})
|
||||
|
||||
await Promise.all([
|
||||
saveBootstrapPeers('api.myjson.com', '/bins/1e5rmh'),
|
||||
saveBootstrapPeers('jsonblob.com', '/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
|
||||
])
|
||||
if(!this.preventNetworkOnExit)
|
||||
{
|
||||
await Promise.all([
|
||||
saveBootstrapPeers('api.myjson.com', '/bins/1e5rmh'),
|
||||
saveBootstrapPeers('jsonblob.com', '/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user