Small adjustment

This commit is contained in:
antao 2018-12-31 19:13:44 +08:00
parent d7aaa3726f
commit 7c15196bac
1 changed files with 2 additions and 1 deletions

View File

@ -364,12 +364,13 @@ std::shared_ptr<std::string> HttpResponseImpl::renderToString() const
{
if (_expriedTime >= 0)
{
if (_httpString && _datePos != std::string::npos)
if (_datePos != std::string::npos)
{
bool isDateChanged = false;
auto newDate = getHttpFullDate(trantor::Date::now(), &isDateChanged);
{
std::lock_guard<std::mutex> lock(*_httpStringMutex);
assert(_httpString);
if (isDateChanged)
{
_httpString = std::make_shared<std::string>(*_httpString);