summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)