Fix yet another bug with node IDs

* Pick appropriate slot
* Log nodeId vs clientId/etc. for less confusion
This commit is contained in:
Bryan Ashby 2020-05-13 19:30:57 -06:00
parent 714f32f695
commit fd6bb47427
No known key found for this signature in database
GPG key ID: B49EB437951D2542
5 changed files with 22 additions and 21 deletions

View file

@ -86,9 +86,9 @@ module.exports = class DownloadQueue {
this.add(entry, true); // true=systemFile
// clean up after ourselves when the session ends
const thisClientId = this.client.session.id;
const thisUniqueId = this.client.session.uniqueId;
Events.once(Events.getSystemEvents().ClientDisconnected, evt => {
if(thisClientId === _.get(evt, 'client.session.id')) {
if(thisUniqueId === _.get(evt, 'client.session.uniqueId')) {
FileEntry.removeEntry(entry, { removePhysFile : true }, err => {
const Log = require('./logger').log;
if(err) {