Skip to content

Poco::Net::TCPServerParams::setMaxThreads(int count) will not accept count == 0. #294

@bakercp

Description

@bakercp

The documentation says that setting maximum threads to 0 will cause the Poco::Net::TCPServerDispatcher to take the provided ThreadPool's capacity():

https://github.com/pocoproject/poco/blob/develop/Net/include/Poco/Net/TCPServerParams.h#L72

Unfortunately, the poco_assert checks poco_assert (count > 0); preventing the user from setting count == 0.

https://github.com/pocoproject/poco/blob/develop/Net/src/TCPServerParams.cpp#L54

It seems the solution should be to change it to:

poco_assert (count >= 0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions