Procházet zdrojové kódy

Fix build error on Windows

yhirose před 1 dnem
rodič
revize
94b5038eb3
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      test/test.cc

+ 4 - 0
test/test.cc

@@ -8712,7 +8712,11 @@ TEST(ClientVulnerabilityTest, PayloadMaxLengthZeroMeansNoLimit) {
         total_sent += static_cast<size_t>(sent);
       }
 
+#ifdef _WIN32
+      ::shutdown(cli, SD_SEND);
+#else
       ::shutdown(cli, SHUT_WR);
+#endif
       // Drain until the client closes its end, ensuring all data is delivered
       char drain[1024];
       while (::recv(cli, drain, sizeof(drain), 0) > 0) {}