diff options
| author | Bennett Goble <signal@lindenlab.com> | 2024-03-29 14:58:33 -0700 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-01 20:06:23 +0300 | 
| commit | c2e0ee9231a547b4f6fd65487a7102036a852ed6 (patch) | |
| tree | a71560d5c9775ab43f4dc147139a58701f758608 | |
| parent | 4173fa1a9ef79c27d39d9ab9dbee46f109fbf510 (diff) | |
BUG-134040: Fix broken SOCKS5 proxy
Second Life's SOCKS5 proxy has been broken on windows for at least six
years due to a conflation of milliseconds and microseconds in the APR
timeout value used when attempting to ping the proxy.
| -rw-r--r-- | indra/llmessage/llproxy.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp index 749e599c66..17f0d9f345 100644 --- a/indra/llmessage/llproxy.cpp +++ b/indra/llmessage/llproxy.cpp @@ -465,7 +465,7 @@ void LLProxy::applyProxySettings(CURL* handle)  /**   * @brief Send one TCP packet and receive one in return.   * - * This operation is done synchronously with a 1000ms timeout. Therefore, it should not be used when a blocking + * This operation is done synchronously with a 100ms timeout. Therefore, it should not be used when a blocking   * operation would impact the operation of the viewer.   *   * @param handle_ptr 	Pointer to a connected LLSocket of type STREAM_TCP. @@ -482,7 +482,7 @@ static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataou  	apr_size_t expected_len = outlen; -	handle->setBlocking(1000); +	handle->setBlocking(100000); // 100ms, 100000us. Should be sufficient for localhost, nearby network    	rv = apr_socket_send(apr_socket, dataout, &outlen);  	if (APR_SUCCESS != rv) @@ -498,8 +498,6 @@ 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;  | 
