SSH: Core::Wait() is moved out of the critical section. (MT fix)

git-svn-id: svn://ultimatepp.org/upp/trunk@13617 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
oblivion 2019-09-26 07:50:11 +00:00
parent e3a4d6c37a
commit 31191dc3f7

View file

@ -68,10 +68,7 @@ bool Ssh::Do(Gate<>& fn)
Check();
if(!ssh->init)
ssh->init = Init();
if(ssh->init && fn())
return false;
Wait();
return true;
return !ssh->init || !fn();
}
bool Ssh::Run(Gate<>&& fn)
@ -81,7 +78,7 @@ bool Ssh::Run(Gate<>&& fn)
ssh->start_time = msecs();
while(Do(fn))
;
Wait();
ssh->status = IDLE;
}