kirdy: report connect error

This commit is contained in:
Sébastien Bourdeauducq 2025-01-20 20:29:23 +08:00
parent ab91b3f7f0
commit 7dfb1f6d4e

View File

@ -8,6 +8,8 @@
Kirdy::Kirdy(asio::string_view host, asio::string_view service) Kirdy::Kirdy(asio::string_view host, asio::string_view service)
{ {
socket.connect(host, 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) Json::Value Kirdy::command(Json::Value &request)