diff --git a/daemon/defer.h b/daemon/defer.h index 20e4ac92b..15fe86b75 100644 --- a/daemon/defer.h +++ b/daemon/defer.h @@ -50,7 +50,12 @@ 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? - kr_assert(kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) == kr_ok()); + if (kr_fails_assert(kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) == kr_ok())) { + kr_log_error(DEFER, "%s != %s\n", + kr_straddr(&addr->ip), + kr_straddr(&defer_sample_state.addr.ip)); + abort(); + } return; }