Skip to content

Commit

Permalink
Merge pull request grpc#19759 from bigfacebear/change_client_channel_…
Browse files Browse the repository at this point in the history
…disconnect_error_memory_order

change memory order of operations on disconnect_error_ in client_channel
  • Loading branch information
bigfacebear committed Jul 26, 2019
2 parents 252743d + 39bc63c commit e315956
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/ext/filters/client_channel/client_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConnectivityStateAndPickerSetter>(
chand, GRPC_CHANNEL_SHUTDOWN, "shutdown from API",
UniquePtr<LoadBalancingPolicy::SubchannelPicker>(
Expand Down

0 comments on commit e315956

Please sign in to comment.