Fix a fatal bug

This commit is contained in:
antao 2018-08-26 16:43:19 +08:00
parent 68d05dae47
commit aebddd27b1
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ void HttpServer::onMessage(const TcpConnectionPtr& conn,
context->setWebsockConnection(wsConn);
}
MsgBuffer buffer;
std::dynamic_pointer_cast<HttpRequestImpl>(resp)->appendToBuffer(&buffer);
std::dynamic_pointer_cast<HttpResponseImpl>(resp)->appendToBuffer(&buffer);
conn->send(std::move(buffer));
},wsConn);
}