فهرست منبع

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;
 	}