From 36be78e54f703cbd08a9660ee06f1b43a8071cf4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 17 Apr 2019 18:24:42 +0300 Subject: SL-2797 SOCKS5 not working reliably --- indra/llmessage/llproxy.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llproxy.cpp') diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp index 5730a36267..dea03aab85 100644 --- a/indra/llmessage/llproxy.cpp +++ b/indra/llmessage/llproxy.cpp @@ -473,7 +473,8 @@ static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataou rv = apr_socket_send(apr_socket, dataout, &outlen); if (APR_SUCCESS != rv) { - LL_WARNS("Proxy") << "Error sending data to proxy control channel, status: " << rv << LL_ENDL; + char buf[MAX_STRING]; + LL_WARNS("Proxy") << "Error sending data to proxy control channel, status: " << rv << " " << apr_strerror(rv, buf, MAX_STRING) << LL_ENDL; ll_apr_warn_status(rv); } else if (expected_len != outlen) @@ -483,13 +484,16 @@ static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataou rv = -1; } + ms_sleep(1); + if (APR_SUCCESS == rv) { expected_len = maxinlen; rv = apr_socket_recv(apr_socket, datain, &maxinlen); if (rv != APR_SUCCESS) { - LL_WARNS("Proxy") << "Error receiving data from proxy control channel, status: " << rv << LL_ENDL; + char buf[MAX_STRING]; + LL_WARNS("Proxy") << "Error receiving data from proxy control channel, status: " << rv << " " << apr_strerror(rv, buf, MAX_STRING) << LL_ENDL; ll_apr_warn_status(rv); } else if (expected_len < maxinlen) -- cgit v1.2.3