summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-01-03 16:26:55 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-01-03 23:12:02 +0100
commit40557509be084f27d48bc5fc51286a664b96942e (patch)
tree4b801c76d0f3a7b68e080a8ab7c6974c62698663 /src/resolve
parentMerge pull request #25910 from crrodriguez/wth_c2x (diff)
downloadsystemd-40557509be084f27d48bc5fc51286a664b96942e.tar.xz
systemd-40557509be084f27d48bc5fc51286a664b96942e.zip
resolved: downgrade inability to send varlink reply error message
Previously, if a client disconnected after sending a lookup request but before waiting for the reply we'd log at LOG_ERR level. That's confusing, since it's entirely OK for the client to lose interest. Hence, let's downgrade to debug level. Fixes: #25892
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-varlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c
index 8ba5eb9833..f878d9ee3f 100644
--- a/src/resolve/resolved-varlink.c
+++ b/src/resolve/resolved-varlink.c
@@ -243,7 +243,7 @@ static void vl_method_resolve_hostname_complete(DnsQuery *query) {
JSON_BUILD_PAIR("flags", JSON_BUILD_INTEGER(dns_query_reply_flags_make(q)))));
finish:
if (r < 0) {
- log_error_errno(r, "Failed to send hostname reply: %m");
+ log_full_errno(ERRNO_IS_DISCONNECT(r) ? LOG_DEBUG : LOG_ERR, r, "Failed to send hostname reply: %m");
r = varlink_error_errno(q->varlink_request, r);
}
}
@@ -462,7 +462,7 @@ static void vl_method_resolve_address_complete(DnsQuery *query) {
JSON_BUILD_PAIR("flags", JSON_BUILD_INTEGER(dns_query_reply_flags_make(q)))));
finish:
if (r < 0) {
- log_error_errno(r, "Failed to send address reply: %m");
+ log_full_errno(ERRNO_IS_DISCONNECT(r) ? LOG_DEBUG : LOG_ERR, r, "Failed to send address reply: %m");
r = varlink_error_errno(q->varlink_request, r);
}
}