Updated Branches: refs/heads/master 1e55ec8fb -> 03bdbc50a
TS-2306: Client connection hang while downloading big file from origin server over SSL connection Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/03bdbc50 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/03bdbc50 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/03bdbc50 Branch: refs/heads/master Commit: 03bdbc50acace06e1e9b20b70adb6515ae09fbe4 Parents: 1e55ec8 Author: Ron Barber <[email protected]> Authored: Mon Feb 3 12:36:28 2014 -0800 Committer: Bryan Call <[email protected]> Committed: Mon Feb 3 12:36:28 2014 -0800 ---------------------------------------------------------------------- CHANGES | 3 +++ iocore/net/SSLNetVConnection.cc | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/03bdbc50/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 4753b52..a260943 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2306] Client connection hang while downloading big file from origin + server over SSL connection + *) [TS-2353] Add ability to load ssl certs that are owned by root and only read only by the user http://git-wip-us.apache.org/repos/asf/trafficserver/blob/03bdbc50/iocore/net/SSLNetVConnection.cc ---------------------------------------------------------------------- diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index 199b6ce..b04de64 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -251,16 +251,14 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread) return; } - // If there is nothing to do, disable connection - if (ntodo <= 0) { + // If there is nothing to do or no space available, disable connection + if (ntodo <= 0 || !buf.writer()->write_avail()) { read_disable(nh, this); return; } + // not sure if this do-while loop is really needed here, please replace this comment if you know do { - if (!buf.writer()->write_avail()) { - buf.writer()->add_block(); - } ret = ssl_read_from_net(this, lthread, r); if (ret == SSL_READ_READY || ret == SSL_READ_ERROR_NONE) { bytes += r;
