fix(p2p): closing on end reverted (it was ok by default)

This commit is contained in:
Alexey Kasyanchuk 2018-02-17 20:17:29 +03:00
parent cbab33039a
commit f23d45996b

View File

@ -1174,15 +1174,12 @@ if(config.spaceQuota)
this.stop = (callback) => { this.stop = (callback) => {
console.log('spider closing...') console.log('spider closing...')
tcpServer.close(() => { torrentClient.destroy(() => {
console.log('p2p server closed') sphinx.end(() => spider.close(() => {
torrentClient.destroy(() => { mysqlSingle.destroy()
sphinx.end(() => spider.close(() => { console.log('spider closed')
mysqlSingle.destroy() callback()
console.log('spider closed') }))
callback()
}))
})
}) })
} }
return this return this