diff --git a/src/common/net/Client.cpp b/src/common/net/Client.cpp index 3a93789b6..6a79749d8 100644 --- a/src/common/net/Client.cpp +++ b/src/common/net/Client.cpp @@ -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; } diff --git a/src/common/net/Client.h b/src/common/net/Client.h index 55105c0ba..d64183384 100644 --- a/src/common/net/Client.h +++ b/src/common/net/Client.h @@ -140,7 +140,7 @@ private: bool m_quiet; char m_buf[kInputBufferSize]; char m_ip[46]; - char m_sendBuf[1024]; + char m_sendBuf[2048]; const char *m_agent; IClientListener *m_listener; int m_extensions;