From 0a9197315cde655913859b28b1519ce2aed825cc Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 15 Jan 2023 03:35:40 -0500 Subject: [PATCH] *Add method to clear registered sources --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 3331ddc..adadf77 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,6 +32,10 @@ export class PeerDiscovery { return true; } + public removeAllSources(): void { + this._sources.clear(); + } + public async discover( pubkey: string | Buffer, options = {}