]> granicus.if.org Git - curl/commitdiff
http2-upload.c: use PIPEWAIT for playing HTTP/2 better
authorDaniel Stenberg <daniel@haxx.se>
Mon, 1 Jun 2015 06:46:18 +0000 (08:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Jun 2015 06:46:18 +0000 (08:46 +0200)
docs/examples/http2-upload.c

index 6b91333fb0930ed9d52a7a97a0c67e2e85fd9689..bca16c0d6dbf631d3ddd1945160f086ae6ed328c 100644 (file)
@@ -221,6 +221,11 @@ static void setup(CURL *hnd, int num, const char *upload)
   curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
   curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
 
+#if (CURLPIPE_MULTIPLEX > 0)
+  /* wait for pipe connection to confirm */
+  curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+
   curl_hnd[num] = hnd;
 }