# Fixed send buffer overflow and increase send buffer size.
This commit is contained in:
parent
dc76879188
commit
0adad68471
2 changed files with 4 additions and 2 deletions
|
@ -482,7 +482,9 @@ int64_t Client::send(const rapidjson::Document &doc)
|
|||
doc.Accept(writer);
|
||||
|
||||
const size_t size = buffer.GetSize();
|
||||
if (size > (sizeof(m_buf) - 2)) {
|
||||
if (size > (sizeof(m_sendBuf) - 2)) {
|
||||
LOG_ERR("[%s] send failed: \"send buffer overflow: %zu > %zu\"", m_pool.url(), size, (sizeof(m_sendBuf) - 2));
|
||||
close();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue