瀏覽代碼

Terminate master_thread early when there are no listening sockets to prevent CivetWeb from crashing

Signed-off-by: DL6ER <dl6er@dl6er.de>
DL6ER 4 月之前
父節點
當前提交
f4d9bf25f1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -20542,7 +20542,7 @@ master_thread_run(struct mg_context *ctx)
 	unsigned int i;
 	unsigned int workerthreadcount;
 
-	if (!ctx) {
+	if (!ctx || !ctx->listening_socket_fds) {
 		return;
 	}