You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/02/28 20:38:54 UTC

[trafficserver] branch 7.1.x updated: Make sure to schedule connect event on correct thread type.

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/7.1.x by this push:
       new  4b80695   Make sure to schedule connect event on correct thread type.
4b80695 is described below

commit 4b80695d223acd174d6ec7ca6fa6cceb803c6d4c
Author: Susan Hinrichs <sh...@ieee.org>
AuthorDate: Thu Jan 26 00:38:17 2017 +0000

    Make sure to schedule connect event on correct thread type.
    
    (cherry picked from commit df4995a9a4bc415d497f04b01918d938bf2a3470)
---
 iocore/net/UnixNetProcessor.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index 490d92e..e94652f 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -258,7 +258,12 @@ UnixNetProcessor::connect_re_internal(Continuation *cont, sockaddr const *target
       }
     }
   }
-  t->schedule_imm(vc);
+  // Try to stay on the current thread if it is the right type
+  if (t->is_event_type(opt->etype)) {
+    t->schedule_imm(vc);
+  } else { // Otherwise, pass along to another thread of the right type
+    eventProcessor.schedule_imm(vc, opt->etype);
+  }
   if (using_socks) {
     return &socksEntry->action_;
   } else

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].