co_async
co_async copied to clipboard
关于http连接超时之后不会清除连接的问题
在HTTPServer::doHandleConnection()这个函数中, 我将 /if (!co_await co_await io.readRequestHeader()) { break; }/
替换为: auto headerResult = co_await io.readRequestHeader(); if (headerResult.has_error() && headerResult.error() == std::errc::stream_timeout) { co_await io.extractSocket().close(); break; } 解决了超时连接不能释放的问题,希望小彭老师修改一下