diff --git a/src/stratum_server.cpp b/src/stratum_server.cpp index d4d0577..51c46ed 100644 --- a/src/stratum_server.cpp +++ b/src/stratum_server.cpp @@ -58,7 +58,8 @@ StratumServer::StratumServer(p2pool* pool) , m_totalFailedShares(0) , m_apiLastUpdateTime(0) { - m_callbackBuf.resize(STRATUM_BUF_SIZE); + // Need a bigger buffer for the TLS handshake + m_callbackBuf.resize(STRATUM_CALLBACK_BUF_SIZE); // Diffuse the initial state in case it has low quality m_rng.discard(10000); diff --git a/src/stratum_server.h b/src/stratum_server.h index e92d875..84257ef 100644 --- a/src/stratum_server.h +++ b/src/stratum_server.h @@ -26,6 +26,7 @@ class p2pool; class BlockTemplate; static constexpr size_t STRATUM_BUF_SIZE = log::Stream::BUF_SIZE + 1; +static constexpr size_t STRATUM_CALLBACK_BUF_SIZE = 16384; static constexpr int DEFAULT_STRATUM_PORT = 3333; class StratumServer : public TCPServer