]> granicus.if.org Git - curl/commitdiff
multi: getsock improvements for QUIC connecting
authorDaniel Stenberg <daniel@haxx.se>
Tue, 13 Aug 2019 06:41:53 +0000 (08:41 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 14 Aug 2019 21:14:12 +0000 (23:14 +0200)
lib/multi.c

index e5c483c5607320b204d6dd3ba6e59d07404f6baf..37c4e55a56b1a934eb4e7802994528f27902327d 100755 (executable)
@@ -832,7 +832,13 @@ static int waitconnect_getsock(struct connectdata *conn,
   for(i = 0; i<2; i++) {
     if(conn->tempsock[i] != CURL_SOCKET_BAD) {
       sock[s] = conn->tempsock[i];
-      rc |= GETSOCK_WRITESOCK(s++);
+      rc |= GETSOCK_WRITESOCK(s);
+#ifdef ENABLE_QUIC
+      if(conn->transport == TRNSPRT_QUIC)
+        /* when connecting QUIC, we want to read the socket too */
+        rc |= GETSOCK_READSOCK(s);
+#endif
+      s++;
     }
   }