From 6d20a3614a6481c65042c309a678ada1612b8158 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Thu, 15 Apr 2021 20:16:44 -0300 Subject: [PATCH] Don't warn when we can't send back to an non-SN incoming connection This happens commonly when the remote has gone away and we shouldn't be warning about it. --- oxenmq/proxy.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oxenmq/proxy.cpp b/oxenmq/proxy.cpp index 32320c3..ca6dcb2 100644 --- a/oxenmq/proxy.cpp +++ b/oxenmq/proxy.cpp @@ -176,7 +176,12 @@ void OxenMQ::proxy_send(bt_dict_consumer data) { } } if (!retry) { - LMQ_LOG(warn, "Unable to send message to ", conn_id, ": ", e.what()); + if (!conn_id.sn() && !conn_id.route.empty()) { // incoming non-SN connection + LMQ_LOG(debug, "Unable to send message to incoming connection ", conn_id, ": ", e.what(), + "; remote has probably disconnected"); + } else { + LMQ_LOG(warn, "Unable to send message to ", conn_id, ": ", e.what()); + } nowarn = true; if (callback_nosend) { job([callback = std::move(callback_nosend), error = e] { callback(&error); });