File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed
Release/tests/functional/http/utilities Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -520,23 +520,24 @@ class _test_http_server
520520 for (auto it = result.headers ().begin (); it != result.headers ().end (); ++it)
521521 tr->m_headers [it->first ] = it->second ;
522522
523- tr-> m_body = result.extract_vector ().get ();
524-
525- {
526- pplx::extensibility::scoped_critical_section_t lock (m_lock);
527- m_responding_requests[tr->m_request_id ] = result;
528- }
523+ result.extract_vector ().then ([ this ,tr,result]( const std::vector< unsigned char >& v) {
524+ tr-> m_body = v;
525+ {
526+ pplx::extensibility::scoped_critical_section_t lock (m_lock);
527+ m_responding_requests[tr->m_request_id ] = result;
528+ }
529529
530- while (!m_cancel)
531- {
532- pplx::extensibility::scoped_critical_section_t lock (m_lock);
533- if (m_requests.size () > 0 )
530+ while (!m_cancel)
534531 {
535- m_requests[0 ].set (tr);
536- m_requests.erase (m_requests.begin ());
537- return ;
532+ pplx::extensibility::scoped_critical_section_t lock (m_lock);
533+ if (m_requests.size () > 0 )
534+ {
535+ m_requests[0 ].set (tr);
536+ m_requests.erase (m_requests.begin ());
537+ return ;
538+ }
538539 }
539- }
540+ });
540541 });
541542 }
542543
You can’t perform that action at this time.
0 commit comments