Fix to FIFOBuffer::flushToStreamAsync

This commit is contained in:
lganzzzo 2019-03-26 02:48:53 +02:00
parent 87dbdea99c
commit b1fcfc6641
2 changed files with 6 additions and 1 deletions

View File

@ -310,6 +310,11 @@ oatpp::async::Action FIFOBuffer::flushToStreamAsync(oatpp::async::AbstractCorout
{}
Action act() override {
if(!m_fifo->m_canRead) {
return finish();
}
if(m_fifo->m_readPosition < m_fifo->m_writePosition) {
m_data1 = &m_fifo->m_buffer[m_fifo->m_readPosition];

View File

@ -116,7 +116,7 @@ oatpp::async::Action Response::sendAsync(oatpp::async::AbstractCoroutine* parent
, m_buffer(oatpp::data::stream::ChunkedBuffer::createShared())
{}
Action act() {
Action act() override {
if(m_response->m_body){
m_response->m_body->declareHeaders(m_response->m_headers);