summaryrefslogtreecommitdiffhomepage
path: root/proto-simconnect
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:12:28 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:13:41 +0100
commit0e096895d6989fef9f35c6a001358836db3825e9 (patch)
tree1b3c0ad75a8f5219f60ef1709ecb762e61ec656b /proto-simconnect
parent14a976e4729d38f86d336fa6054279b33905b63c (diff)
proto/simconnect: don't hang so long on exit
Issue: #804
Diffstat (limited to 'proto-simconnect')
-rw-r--r--proto-simconnect/ftnoir_protocol_sc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/proto-simconnect/ftnoir_protocol_sc.cpp b/proto-simconnect/ftnoir_protocol_sc.cpp
index b94d8769..9a1db9b5 100644
--- a/proto-simconnect/ftnoir_protocol_sc.cpp
+++ b/proto-simconnect/ftnoir_protocol_sc.cpp
@@ -76,8 +76,12 @@ void simconnect::run()
(void)simconnect_close(handle);
}
- if (!isInterruptionRequested())
- Sleep(sleep_time * 1000);
+ for (unsigned k = 0; k < sleep_time * 25; k++)
+ {
+ if (isInterruptionRequested())
+ break;
+ Sleep(1000 / 25);
+ }
}
qDebug() << "simconnect: exit";