Skip to content

Commit

Permalink
daemon/defer: change address mismatch assert to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukáš Ondráček committed Dec 2, 2024
1 parent 8b4c850 commit 4352943
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions daemon/defer.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ static inline void defer_sample_addr(const union kr_sockaddr *addr, bool stream)

if (defer_sample_state.addr.ip.sa_family != AF_UNSPEC) {
// TODO: this costs performance, so only in some debug mode?
if (kr_fails_assert(kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) == kr_ok())) {
kr_log_error(DEFER, "%s != %s\n",
if (kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) != kr_ok()) {
char defer_addr[KR_STRADDR_MAXLEN + 1] = { 0 };
strncpy(defer_addr, kr_straddr(&defer_sample_state.addr.ip), sizeof(defer_addr) - 1);
kr_log_warning(DEFER, "Sampling address mismatch: %s != %s\n",
kr_straddr(&addr->ip),
kr_straddr(&defer_sample_state.addr.ip));
abort(); // TODO change this to warning or remove before releasing
defer_addr);
return;
}

}

switch (addr->ip.sa_family) {
Expand Down

0 comments on commit 4352943

Please sign in to comment.