From 83590be3b3e44e9a17428e6fb7cef23383bd0fd3 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Fri, 7 Jul 2017 12:11:21 +0900 Subject: [PATCH] Limit maximum size ATS can read from net at a time --- iocore/net/SSLNetVConnection.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index 4bd343fbe7b..42d86230ecb 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -205,6 +205,9 @@ ssl_read_from_net(SSLNetVConnection *sslvc, EThread *lthread, int64_t &ret) bytes_read = 0; while (sslErr == SSL_ERROR_NONE) { + if (bytes_read / (4 * 1024 * 1024) > 0) { + break; + } int64_t block_write_avail = buf.writer()->block_write_avail(); if (block_write_avail <= 0) { buf.writer()->add_block();