diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index cbc99af3..97c24436 100644 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -225,7 +225,11 @@ void HttpAppFrameworkImpl::registerHttpController( } HttpAppFramework &HttpAppFrameworkImpl::setThreadNum(size_t threadNum) { - assert(threadNum >= 1); + if (threadNum == 0) + { + _threadNum = std::thread::hardware_concurrency(); + return *this; + } _threadNum = threadNum; return *this; }