mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
屏蔽sendfile特性
This commit is contained in:
parent
832c8d0d80
commit
96503967fc
@ -594,10 +594,13 @@ void HttpSession::sendResponse(int code,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
//sendfile跟共享mmap相比并没有性能上的优势,相反,sendfile还有功能上的缺陷,先屏蔽
|
||||||
if (typeid(*this) == typeid(HttpSession) && !body->sendFile(getSock()->rawFD())) {
|
if (typeid(*this) == typeid(HttpSession) && !body->sendFile(getSock()->rawFD())) {
|
||||||
// http支持sendfile优化
|
// http支持sendfile优化
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GET_CONFIG(uint32_t, sendBufSize, Http::kSendBufSize);
|
GET_CONFIG(uint32_t, sendBufSize, Http::kSendBufSize);
|
||||||
if (body->remainSize() > sendBufSize) {
|
if (body->remainSize() > sendBufSize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user