From 39bc63c88cc362b45869e402b2a0383caae3c79e Mon Sep 17 00:00:00 2001 From: Qiancheng Zhao Date: Fri, 26 Jul 2019 09:59:57 -0700 Subject: [PATCH] change memory order of operations on disconnect_error_ in client_channel --- src/core/ext/filters/client_channel/client_channel.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 4cbd52a486a..c06e995f5a5 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -1717,10 +1717,10 @@ void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) { GRPC_ERROR_UNREF(op->disconnect_with_error); } else { // Disconnect. - grpc_error* error = GRPC_ERROR_NONE; - GPR_ASSERT(chand->disconnect_error_.CompareExchangeStrong( - &error, op->disconnect_with_error, MemoryOrder::ACQ_REL, - MemoryOrder::ACQUIRE)); + GPR_ASSERT(chand->disconnect_error_.Load(MemoryOrder::RELAXED) == + GRPC_ERROR_NONE); + chand->disconnect_error_.Store(op->disconnect_with_error, + MemoryOrder::RELEASE); New( chand, GRPC_CHANNEL_SHUTDOWN, "shutdown from API", UniquePtr(