mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 11:41:44 +08:00
优化http服务器和客户端内存占用
This commit is contained in:
@@ -186,7 +186,7 @@ int64_t HttpClient::onRecvHeader(const char *data, uint64_t len) {
|
||||
//所以返回-1代表我们接下来分段接收content
|
||||
_recvedBodySize = 0;
|
||||
//根据_totalBodySize设置接收缓存大小
|
||||
_sock->setReadBuffer(std::make_shared<BufferRaw>(MAX(_totalBodySize + 1,256 * 1024)));
|
||||
_sock->setReadBuffer(std::make_shared<BufferRaw>(MIN(_totalBodySize + 1,256 * 1024)));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user