File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Release/src/http/listener Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -708,8 +708,9 @@ void windows_request_context::init_response_callbacks(ShouldWaitForBody shouldWa
708708 // Copy the request reference in case it's the last
709709 http_request request = m_msg;
710710 m_msg = http_request ();
711- proxy_content_ready.set_exception (std::current_exception ());
712- cancel_request (std::current_exception ());
711+ auto exc = std::current_exception ();
712+ proxy_content_ready.set_exception (exc);
713+ cancel_request (exc);
713714 return ;
714715 }
715716
@@ -731,9 +732,9 @@ void windows_request_context::init_response_callbacks(ShouldWaitForBody shouldWa
731732 // http_request instance to be destroyed. There is nothing to do then
732733 // so don't send a response.
733734 // Avoid unobserved exception handler
734- pplx::create_task (proxy_content_ready).then ([this ](pplx::task<void > t)
735+ pplx::create_task (proxy_content_ready).then ([](pplx::task<void > t)
735736 {
736- try { t.wait (); } catch (...) {}
737+ try { t.wait (); } catch (...) {}
737738 });
738739 return ;
739740 }
@@ -745,7 +746,7 @@ void windows_request_context::init_response_callbacks(ShouldWaitForBody shouldWa
745746 m_response = http::http_response (status_codes::InternalError);
746747 }
747748
748- pplx::create_task (m_response_completed).then ([this ](:: pplx::task<void > t)
749+ pplx::create_task (m_response_completed).then ([this ](pplx::task<void > t)
749750 {
750751 // After response is sent, break circular reference between http_response and the request context.
751752 // Otherwise http_listener::close() can hang.
You can’t perform that action at this time.
0 commit comments