-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
RESTinio sets SO_REUSEADDR option in settings by default. But on Windows SO_REUSEADDR works differently than on Linux (and other Unixes AFAIK): on Windows SO_REUSEADDR allows to run two instances of RESTinio server on the same address. For more information see, for example, this and this.
So I think wa have to change the behaviour of create_default_unique_object_instance<acceptor_option_setter_t>:
restinio/dev/restinio/settings.hpp
Lines 229 to 235 in 7994a15
| create_default_unique_object_instance< acceptor_options_setter_t >() | |
| { | |
| return std::make_unique< acceptor_options_setter_t >( | |
| []( acceptor_options_t & options ){ | |
| options.set_option( asio_ns::ip::tcp::acceptor::reuse_address( true ) ); | |
| } ); | |
| } |
The reuse_address should not be used on Windows.
Metadata
Metadata
Assignees
Labels
No labels