From 8e9c42d67d7610cee3aea4fab630a170f2828b8c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 15 Oct 2020 14:26:08 +0200 Subject: [PATCH] net/AsyncConnect: use the SO_ERROR result, not errno Fixes regression by commit dfd26025ccb652a7514f7c73429fbf948e159dd2 --- src/net/AsyncConnect.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/AsyncConnect.cxx b/src/net/AsyncConnect.cxx index 7128ae6e..541fc780 100644 --- a/src/net/AsyncConnect.cxx +++ b/src/net/AsyncConnect.cxx @@ -77,7 +77,7 @@ AsyncConnect::OnSocketReady(unsigned) noexcept int s_err = event.GetSocket().GetError(); if (s_err != 0) { - handler.OnConnectError(strerror(errno)); + handler.OnConnectError(strerror(s_err)); return; }