trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject [trafficserver] branch master updated: Make sure to schedule connect event on correct thread type.
Date Thu, 26 Jan 2017 16:59:44 GMT
This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

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

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

    Make sure to schedule connect event on correct thread type.
---
 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" <commits@trafficserver.apache.org>'].

Mime
View raw message