(libT) #5291 'increase scrape buffer sizes to accomodate for multiscrape': done with patch by reardon

This commit is contained in:
Jordan Lee 2013-02-10 23:21:58 +00:00
parent 76a3b116f0
commit 0be5e8deef
1 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@ sockoptfunction (void * vtask, curl_socket_t fd, curlsocktype purpose UNUSED)
/* announce and scrape requests have tiny payloads. */
if (isScrape || isAnnounce)
{
const int sndbuf = 1024;
const int rcvbuf = isScrape ? 2048 : 3072;
const int sndbuf = isScrape ? 4096 : 1024;
const int rcvbuf = isScrape ? 4096 : 3072;
setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof (sndbuf));
setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof (rcvbuf));
}