Skip to content

Commit

Permalink
Set ciao as default advertiser
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jul 20, 2024
1 parent c3591d5 commit 38a613d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/Accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,16 +1186,16 @@ export class Accessory extends EventEmitter {
// create our Advertiser which broadcasts our presence over mdns
const parsed = Accessory.parseBindOption(info);

let selectedAdvertiser = info.advertiser ?? MDNSAdvertiser.BONJOUR;
let selectedAdvertiser = info.advertiser ?? MDNSAdvertiser.CIAO;
if (
(info.advertiser === MDNSAdvertiser.AVAHI && !await AvahiAdvertiser.isAvailable()) ||
(info.advertiser === MDNSAdvertiser.RESOLVED && !await ResolvedAdvertiser.isAvailable())
) {
console.error(
`[${this.displayName}] The selected advertiser, "${info.advertiser}", isn't available on this platform. ` +
`Reverting to "${MDNSAdvertiser.BONJOUR}"`,
`Reverting to "${MDNSAdvertiser.CIAO}"`,
);
selectedAdvertiser = MDNSAdvertiser.BONJOUR;
selectedAdvertiser = MDNSAdvertiser.CIAO;
}

switch (selectedAdvertiser) {
Expand Down

0 comments on commit 38a613d

Please sign in to comment.