Browse Source

Merge branch 'master' of https://github.com/civetweb/civetweb

bel2125 5 years ago
parent
commit
970e29d60d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/civetweb.c

+ 3 - 3
src/civetweb.c

@@ -19709,9 +19709,6 @@ static
 	ctx->callbacks.exit_context = exit_callback;
 	ctx->context_type = CONTEXT_SERVER; /* server context */
 
-	/* Start master (listening) thread */
-	mg_start_thread_with_id(master_thread, ctx, &ctx->masterthreadid);
-
 	/* Start worker threads */
 	for (i = 0; i < ctx->cfg_worker_threads; i++) {
 		/* worker_thread sets up the other fields */
@@ -19761,6 +19758,9 @@ static
 		}
 	}
 
+    /* Start master (listening) thread */
+    mg_start_thread_with_id(master_thread, ctx, &ctx->masterthreadid);
+
 	pthread_setspecific(sTlsKey, NULL);
 	return ctx;
 }