*dht missing on connect call

This commit is contained in:
Derrick Hammer 2022-08-03 21:36:30 -04:00
parent cc2def1901
commit 395edfe75a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 5 deletions

View File

@ -32,7 +32,11 @@ export class DHT {
public async connect(pubkey: string): Promise<Socket> {
await this.setup();
const [resp, err] = await callModule(DHT_MODULE, "connect", { pubkey });
const dht = !this.useDefaultDht ? this.id : undefined;
const [resp, err] = await callModule(DHT_MODULE, "connect", {
pubkey,
dht,
});
if (err) {
throw new Error(err);
}