Skip to content

Commit

Permalink
Direct users to the wiki if resolved advert fails
Browse files Browse the repository at this point in the history
  • Loading branch information
elyscape committed Nov 2, 2022
1 parent bc06c23 commit 8d0b144
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/lib/Advertiser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,23 @@ export class ResolvedAdvertiser extends EventEmitter implements Advertiser {

debug(`Starting to advertise '${this.accessoryInfo.displayName}' using systemd-resolved backend!`);

this.path = await ResolvedAdvertiser.resolvedInvoke(this.bus, "RegisterService", {
body: [
this.accessoryInfo.displayName, // name
this.accessoryInfo.displayName, // name_template
"_hap._tcp", // type
this.port, // service_port
0, // service_priority
0, // service_weight
[this.createTxt()], // txt_datas
],
signature: "sssqqqaa{say}",
});
try {
this.path = await ResolvedAdvertiser.resolvedInvoke(this.bus, "RegisterService", {
body: [
this.accessoryInfo.displayName, // name
this.accessoryInfo.displayName, // name_template
"_hap._tcp", // type
this.port, // service_port
0, // service_priority
0, // service_weight
[this.createTxt()], // txt_datas
],
signature: "sssqqqaa{say}",
});
} catch (error) {
error.message = `Possible permissions issue. Check the wiki for details. ${error.message}`;
throw error;
}
}

public async updateAdvertisement(silent?: boolean): Promise<void> {
Expand Down

0 comments on commit 8d0b144

Please sign in to comment.