File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -149,14 +149,11 @@ std::future<bool> ClientImpl::IdentifyAsync(Context context) {
149
149
}
150
150
151
151
void ClientImpl::RestartDataSource () {
152
- auto start_op = [this ]() {
153
- data_source_ = data_source_factory_ ();
154
- data_source_->Start ();
155
- };
156
- if (!data_source_) {
157
- return start_op ();
152
+ if (data_source_) {
153
+ data_source_->ShutdownAsync (nullptr );
158
154
}
159
- data_source_->ShutdownAsync (start_op);
155
+ data_source_ = data_source_factory_ ();
156
+ data_source_->Start ();
160
157
}
161
158
162
159
std::future<bool > ClientImpl::StartAsyncInternal (
@@ -170,7 +167,7 @@ std::future<bool> ClientImpl::StartAsyncInternal(
170
167
if (auto const state = status.State (); IsInitialized (state)) {
171
168
init_promise->set_value (result (status.State ()));
172
169
return true ; /* delete this change listener since the desired
173
- state was reached */
170
+ state was reached */
174
171
}
175
172
return false ; /* keep the change listener */
176
173
});
You can’t perform that action at this time.
0 commit comments