Skip to content

Commit

Permalink
lib/avahi/Client: relax assertion after COLLISION/REGISTERING
Browse files Browse the repository at this point in the history
Turns out that `AVAHI_CLIENT_S_COLLISION` can occur after
`AVAHI_CLIENT_S_RUNNING`, and `connected==true`.  Relaxing this fixes
a bogus assertion failure.
  • Loading branch information
MaxKellermann committed Mar 11, 2024
1 parent 9c68f24 commit 00cf036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/avahi/Client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Client::ClientCallback(AvahiClient *c, AvahiClientState state) noexcept

case AVAHI_CLIENT_S_COLLISION:
case AVAHI_CLIENT_S_REGISTERING:
assert(!connected);
connected = false;

for (auto *l : listeners)
l->OnAvahiChanged();
Expand Down

0 comments on commit 00cf036

Please sign in to comment.