You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ok...@apache.org on 2019/01/09 10:34:19 UTC

[trafficserver] branch master updated: The mutex of NetAccept::action_->continuation is optional when the EVENT_ERROR event is called back.

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

oknet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 732dd20  The mutex of NetAccept::action_->continuation is optional when the EVENT_ERROR event is called back.
732dd20 is described below

commit 732dd2095547387fb0b51d86460405c668acac78
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Mon Jan 7 11:48:26 2019 +0800

    The mutex of NetAccept::action_->continuation is optional when the EVENT_ERROR event is called back.
    
    In general, `NetAccept::action_->continuation` is a type of
    `ProtocolProbeSessionAccept` object.
    
    The mutex of `ProtocolProbeSessionAccept` is NULL to allow parallel
    accepts.
    
    Resolve issue #4726.
---
 iocore/net/UnixNetAccept.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index 21f39c4..9c3e40f 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -322,7 +322,7 @@ NetAccept::do_blocking_accept(EThread *t)
         return 0;
       }
       if (!action_->cancelled) {
-        SCOPED_MUTEX_LOCK(lock, action_->mutex, t);
+        SCOPED_MUTEX_LOCK(lock, action_->mutex ? action_->mutex : t->mutex, t);
         action_->continuation->handleEvent(EVENT_ERROR, (void *)(intptr_t)res);
         Warning("accept thread received fatal error: errno = %d", errno);
       }