浏览代码

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

bel2125 5 年之前
父节点
当前提交
970e29d60d
共有 1 个文件被更改,包括 3 次插入3 次删除
  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;
 }