fix(closing): fix errors on closing

This commit is contained in:
Alexey Kasyanchuk
2018-08-08 00:58:58 +03:00
parent ddfd43498d
commit 463eb7cce7
3 changed files with 38 additions and 18 deletions

View File

@ -210,10 +210,6 @@ module.exports = async ({
if(typeof callback != 'function')
return;
// ignore sql requests on closing
if(sphinxSingle.state === 'disconnected')
return
const cpu = cpuUsage()
const limit = Math.max(1, 5 - (cpu / 20) | 0)