*If the dht closes, then remove the connection handler and emit the close event on the swarm
This commit is contained in:
parent
3b6448fec8
commit
2a533d6f7f
|
@ -317,6 +317,12 @@ async function handleListenConnections(aq: ActiveQuery) {
|
|||
swarm.off("connection", listener);
|
||||
aq.respond();
|
||||
});
|
||||
|
||||
swarm.activeRelay.dht.one("close", () => {
|
||||
swarm.off("connection", listener);
|
||||
swarm.emit("close");
|
||||
aq.respond();
|
||||
});
|
||||
}
|
||||
|
||||
async function handleGetSocketInfo(aq: ActiveQuery) {
|
||||
|
|
Loading…
Reference in New Issue