Compare commits

..

No commits in common. "ebaba22213d1b9f051af9f9a0ec04ee28e7cfa61" and "340cd467349457a01716a7eb1e6c3e513158ca63" have entirely different histories.

3 changed files with 3 additions and 5 deletions

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAkBlC,eAAO,MAAM,YAAY,eAAuB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,QAAQ,CAAS;gBAEb,EACV,OAAkB,EAClB,GAAS,EACT,aAAiB,EACjB,EAA2B,EAC3B,KAAY,EACZ,QAAmB,GACpB;;;;;;;KAAK;IAmBN,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,SAAS;IAsDjB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;IAenC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;CAY1C"} {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAkBlC,eAAO,MAAM,YAAY,eAAuB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,QAAQ,CAAS;gBAEb,EACV,OAAkB,EAClB,GAAS,EACT,aAAiB,EACjB,EAA2B,EAC3B,KAAY,EACZ,QAAmB,GACpB;;;;;;;KAAK;IAmBN,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,SAAS;IAqDjB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;IAenC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;CAY1C"}

3
dist/index.js vendored
View File

@ -20,7 +20,7 @@ const LRU_SIZE = 255;
const TTL = 255; const TTL = 255;
const PROTOCOL = "lumeweb.flood"; const PROTOCOL = "lumeweb.flood";
exports.FLOOD_SYMBOL = Symbol.for(PROTOCOL); exports.FLOOD_SYMBOL = Symbol.for(PROTOCOL);
const closedMap = new Set(); const closedMap = new Map();
class DHTFlood extends events_1.default { class DHTFlood extends events_1.default {
id; id;
ttl; ttl;
@ -87,7 +87,6 @@ class DHTFlood extends events_1.default {
closedMap.delete(peer); closedMap.delete(peer);
}; };
peer.on("close", close); peer.on("close", close);
closedMap.add(peer);
} }
chan = peer[exports.FLOOD_SYMBOL]; chan = peer[exports.FLOOD_SYMBOL];
if (!chan) { if (!chan) {

View File

@ -18,7 +18,7 @@ const PROTOCOL = "lumeweb.flood";
export const FLOOD_SYMBOL = Symbol.for(PROTOCOL); export const FLOOD_SYMBOL = Symbol.for(PROTOCOL);
const closedMap = new Set(); const closedMap = new Map();
export default class DHTFlood extends EventEmitter { export default class DHTFlood extends EventEmitter {
private id: Buffer; private id: Buffer;
@ -113,7 +113,6 @@ export default class DHTFlood extends EventEmitter {
}; };
peer.on("close", close); peer.on("close", close);
closedMap.add(peer);
} }
chan = peer[FLOOD_SYMBOL]; chan = peer[FLOOD_SYMBOL];