update lock logic
This commit is contained in:
parent
eb7c1d0c8f
commit
edba9130b1
|
@ -295,9 +295,8 @@ int main(int argc, char *argv[])
|
||||||
if (openInSingleInstance) {
|
if (openInSingleInstance) {
|
||||||
int openCount = 0;
|
int openCount = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (lockFile.tryLock())
|
if (lockFile.tryLock(100))
|
||||||
break;
|
break;
|
||||||
QThread::msleep(100);
|
|
||||||
openCount++;
|
openCount++;
|
||||||
if (openCount>100)
|
if (openCount>100)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue