summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-05-19 21:05:48 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-19 21:39:08 +0200
commitdd23021f588f5d50171cfb0d54108f594b139b26 (patch)
tree28b82b6a804158231f058f979ef742c97967d8c4 /methods
parent7f9ec14ed026a0fc35309ab4907d3259353469f4 (diff)
Reword error for timed out read/write on SOCKS proxy
Closes: #898886
Diffstat (limited to 'methods')
-rw-r--r--methods/connect.cc7
1 files changed, 6 insertions, 1 deletions
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)