Parcourir la source

Check SO_EXCLUSIVEADDRUSE in Win32 unit_test

bel il y a 10 ans
Parent
commit
029fd0f7e1
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      src/civetweb.c

+ 7 - 1
src/civetweb.c

@@ -8260,7 +8260,13 @@ static int set_ports_option(struct mg_context *ctx)
 			            * if someone already has the socket -- DTL */
 			           setsockopt(so.sock,
 			                      SOL_SOCKET,
-			                      SO_REUSEADDR /* TODO(high): check with unit test -> SO_EXCLUSIVEADDRUSE */,
+			                      /* TODO (high): unit test only works with
+			                       * SO_REUSEADDR, but not with
+			                       * SO_EXCLUSIVEADDRUSE. Maybe connection
+			                       * open/close is too fast in unit_test.c
+			                       * ==> needs to be checked
+			                       */
+			                      SO_EXCLUSIVEADDRUSE,
 			                      (SOCK_OPT_TYPE)&on,
 			                      sizeof(on)) != 0 ||
 #else