Compare commits
2 Commits
340cd46734
...
ebaba22213
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | ebaba22213 | |
Derrick Hammer | ead991f9af |
|
@ -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;IAqDjB,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;IAsDjB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;IAenC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAW;CAY1C"}
|
|
@ -20,7 +20,7 @@ const LRU_SIZE = 255;
|
|||
const TTL = 255;
|
||||
const PROTOCOL = "lumeweb.flood";
|
||||
exports.FLOOD_SYMBOL = Symbol.for(PROTOCOL);
|
||||
const closedMap = new Map();
|
||||
const closedMap = new Set();
|
||||
class DHTFlood extends events_1.default {
|
||||
id;
|
||||
ttl;
|
||||
|
@ -87,6 +87,7 @@ class DHTFlood extends events_1.default {
|
|||
closedMap.delete(peer);
|
||||
};
|
||||
peer.on("close", close);
|
||||
closedMap.add(peer);
|
||||
}
|
||||
chan = peer[exports.FLOOD_SYMBOL];
|
||||
if (!chan) {
|
||||
|
|
|
@ -18,7 +18,7 @@ const PROTOCOL = "lumeweb.flood";
|
|||
|
||||
export const FLOOD_SYMBOL = Symbol.for(PROTOCOL);
|
||||
|
||||
const closedMap = new Map();
|
||||
const closedMap = new Set();
|
||||
|
||||
export default class DHTFlood extends EventEmitter {
|
||||
private id: Buffer;
|
||||
|
@ -113,6 +113,7 @@ export default class DHTFlood extends EventEmitter {
|
|||
};
|
||||
|
||||
peer.on("close", close);
|
||||
closedMap.add(peer);
|
||||
}
|
||||
|
||||
chan = peer[FLOOD_SYMBOL];
|
||||
|
|
Loading…
Reference in New Issue