- Change the 1 second SO_SNDBUF update limit from per transfer to per
connection.
Prior to this change many transfers over the same connection could cause
many SO_SNDBUF updates made to that connection per second, which was
unnecessary.
Closes https://github.com/curl/curl/pull/12911
#if defined(_WIN32) && defined(USE_WINSOCK)
{
struct curltime n = Curl_now();
- if(Curl_timediff(n, k->last_sndbuf_update) > 1000) {
+ if(Curl_timediff(n, conn->last_sndbuf_update) > 1000) {
win_update_buffer_size(conn->writesockfd);
- k->last_sndbuf_update = n;
+ conn->last_sndbuf_update = n;
}
}
#endif
} p;
#ifndef CURL_DISABLE_DOH
struct dohdata *doh; /* DoH specific data for this request */
-#endif
-#if defined(_WIN32) && defined(USE_WINSOCK)
- struct curltime last_sndbuf_update; /* last time readwrite_upload called
- win_update_buffer_size */
#endif
char fread_eof[2]; /* the body read callback (index 0) returned EOF or
the trailer read callback (index 1) returned EOF */
CtxtHandle *sslContext;
#endif
+#if defined(_WIN32) && defined(USE_WINSOCK)
+ struct curltime last_sndbuf_update; /* last time readwrite_upload called
+ win_update_buffer_size */
+#endif
+
#ifdef USE_GSASL
struct gsasldata gsasl;
#endif