Fix: guard on share_list to avoid duplicate sub-clients on reconnect
This commit is contained in:
@@ -552,7 +552,9 @@ DWORD WINAPI StartClient(LPVOID lParam)
|
||||
// The main ClientApp.
|
||||
settings.SetServer(list[0].c_str(), settings.ServerPort());
|
||||
}
|
||||
if (!app.m_bShared) {
|
||||
static bool hasRun = false;
|
||||
if (!app.m_bShared && !hasRun) {
|
||||
hasRun = true;
|
||||
auto a = cfg.GetStr("settings", "share_list");
|
||||
auto shareList = a.empty() ? std::vector<std::string>{} : StringToVector(a, '|');
|
||||
for (int i = 0; i < shareList.size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user