You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2015/06/30 04:02:55 UTC
trafficserver git commit: [TS-3714]: adjust protocol probe to adjust
for early read
Repository: trafficserver
Updated Branches:
refs/heads/ts3714 a88d6adfa -> 8c76e6aca
[TS-3714]: adjust protocol probe to adjust for early read
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8c76e6ac
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8c76e6ac
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8c76e6ac
Branch: refs/heads/ts3714
Commit: 8c76e6aca9be8f71b714183ee861cabee4bac84d
Parents: a88d6ad
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Tue Jun 30 02:02:00 2015 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Tue Jun 30 02:02:00 2015 +0000
----------------------------------------------------------------------
iocore/net/SSLNetVConnection.cc | 2 +-
proxy/ProtocolProbeSessionAccept.cc | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c76e6ac/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index bf9fa9e..64c6d6e 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -270,7 +270,7 @@ ssl_read_from_net(SSLNetVConnection *sslvc, EThread *lthread, int64_t &ret)
} // while( block_write_avail > 0 )
} // for ( bytes_read = 0; (b != 0); b = b->next)
- if ((bytes_read > 0) && (event != SSL_READ_EOS)) {
+ if (bytes_read > 0) {
Debug("ssl", "[SSL_NetVConnection::ssl_read_from_net] bytes_read=%" PRId64, bytes_read);
buf.writer()->fill(bytes_read);
s->vio.ndone += bytes_read;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c76e6ac/proxy/ProtocolProbeSessionAccept.cc
----------------------------------------------------------------------
diff --git a/proxy/ProtocolProbeSessionAccept.cc b/proxy/ProtocolProbeSessionAccept.cc
index 11673f7c..3f99771 100644
--- a/proxy/ProtocolProbeSessionAccept.cc
+++ b/proxy/ProtocolProbeSessionAccept.cc
@@ -156,8 +156,15 @@ ProtocolProbeSessionAccept::mainEvent(int event, void *data)
// XXX we need to apply accept inactivity timeout here ...
- vio = netvc->do_io_read(probe, BUFFER_SIZE_FOR_INDEX(ProtocolProbeTrampoline::buffer_size_index), probe->iobuf);
- vio->reenable();
+ if (!probe->reader->is_read_avail_more_than(0)) {
+ Debug ("http", "probe needs data, read..");
+ vio = netvc->do_io_read(probe, BUFFER_SIZE_FOR_INDEX(ProtocolProbeTrampoline::buffer_size_index), probe->iobuf);
+ vio->reenable();
+ } else {
+ Debug ("http", "probe already has data, call ioComplete directly..");
+ vio = netvc->do_io_read(NULL, 0, NULL);
+ probe->ioCompletionEvent(VC_EVENT_READ_COMPLETE, (void*)vio);
+ }
return EVENT_CONT;
}