Make invalid channel initialization cancellable through pending state

This commit is contained in:
Alexey Rybalchenko 2022-11-16 19:55:22 +01:00
parent 1c8d1245ad
commit 9172a4aa04

View File

@ -304,7 +304,7 @@ void Device::ConnectWrapper()
// first attempt
AttachChannels(fUninitializedConnectingChannels);
// if not all channels could be connected, update their address values from config and retry
while (!fUninitializedConnectingChannels.empty()) {
while (!fUninitializedConnectingChannels.empty() && !NewStatePending()) {
this_thread::sleep_for(chrono::milliseconds(sleepTimeInMS));
for (auto& chan : fUninitializedConnectingChannels) {