diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 72d351fb915..75d8c9e369a 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -1216,9 +1216,9 @@ void ChannelData::ExternalConnectivityWatcher:: (*external_watchers).erase(it); } } - if (watcher != nullptr && cancel) { - watcher->Cancel(); - } + // watcher->Cancel() will hop into the WorkSerializer, so we have to unlock + // the mutex before calling it. + if (watcher != nullptr && cancel) watcher->Cancel(); } void ChannelData::ExternalConnectivityWatcher::Start() {