-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
The different constructors for web::http::experimental::listener::details::http_listener_impl initialize the m_close_task differently.
cpprestsdk/Release/include/cpprest/http_listener.h
Lines 203 to 205 in 07cf589
| // Used to record that the listener is closed. | |
| bool m_closed; | |
| pplx::task<void> m_close_task; |
The default constructor that is visible to SDK users since it is inline in the header initializes it like so:
| http_listener_impl() : m_closed(true), m_close_task(pplx::task_from_result()) {} |
However, the other constructors leave the task default initialized:
cpprestsdk/Release/src/http/listener/http_listener.cpp
Lines 57 to 66 in 07cf589
| details::http_listener_impl::http_listener_impl(http::uri address) : m_uri(std::move(address)), m_closed(true) | |
| { | |
| check_listener_uri(m_uri); | |
| } | |
| details::http_listener_impl::http_listener_impl(http::uri address, http_listener_config config) | |
| : m_uri(std::move(address)), m_config(std::move(config)), m_closed(true) | |
| { | |
| check_listener_uri(m_uri); | |
| } |
A default constructed task behaves quite differently, so this seems like an oversight.
Metadata
Metadata
Assignees
Labels
No labels