From 7dfb1f6d4ef1aa1c65ed8ca34bea70169e1e7b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Mon, 20 Jan 2025 20:29:23 +0800 Subject: [PATCH] kirdy: report connect error --- kirdy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kirdy.cpp b/kirdy.cpp index 5d35dca..52a9f6b 100644 --- a/kirdy.cpp +++ b/kirdy.cpp @@ -8,6 +8,8 @@ Kirdy::Kirdy(asio::string_view host, asio::string_view service) { socket.connect(host, service); + if(!socket) + std::cerr << "failed to connect to Kirdy at " << host << ": " << socket.error().message() << "\n"; } Json::Value Kirdy::command(Json::Value &request)