diff --git a/lib/transfer.c b/lib/transfer.c index 7d9fa6bd4f..63a16ae86d 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -781,9 +781,9 @@ static CURLcode readwrite_upload(struct Curl_easy *data, #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 diff --git a/lib/urldata.h b/lib/urldata.h index fabc30ea4b..21bc61348c 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -721,10 +721,6 @@ struct SingleRequest { } 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 */ @@ -998,6 +994,11 @@ struct connectdata { 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