From 5982b5c360f6123d3cf72d8883ed9d3da08e8c06 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 10 May 2020 14:18:03 -0400 Subject: [PATCH] Fix #471 --- httplib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index fa34904..fb922e7 100644 --- a/httplib.h +++ b/httplib.h @@ -50,7 +50,9 @@ #ifndef CPPHTTPLIB_THREAD_POOL_COUNT #define CPPHTTPLIB_THREAD_POOL_COUNT \ - ((std::max)(8u, std::thread::hardware_concurrency() - 1)) + ((std::max)(8u, std::thread::hardware_concurrency() > 0 \ + ? std::thread::hardware_concurrency() - 1 \ + : 0)) #endif /*