From dd23021f588f5d50171cfb0d54108f594b139b26 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 19 May 2018 21:05:48 +0200 Subject: Reword error for timed out read/write on SOCKS proxy Closes: #898886 --- methods/connect.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'methods') diff --git a/methods/connect.cc b/methods/connect.cc index 35f2da397..d4e4303b3 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -546,7 +546,12 @@ static bool TalkToSocksProxy(int const ServerFd, std::string const &Proxy, unsigned int const Size, unsigned int const Timeout) { if (WaitFd(ServerFd, ReadWrite, Timeout) == false) - return _error->Error("Waiting for the SOCKS proxy %s to %s timed out", URI::SiteOnly(Proxy).c_str(), type); + { + if (ReadWrite) + return _error->Error("Timed out while waiting to write '%s' to proxy %s", type, URI::SiteOnly(Proxy).c_str()); + else + return _error->Error("Timed out while waiting to read '%s' from proxy %s", type, URI::SiteOnly(Proxy).c_str()); + } if (ReadWrite == false) { if (FileFd::Read(ServerFd, ToFrom, Size) == false) -- cgit v1.2.3