diff options
-rw-r--r-- | ambithread.c | 2 | ||||
-rw-r--r-- | ambithread.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ambithread.c b/ambithread.c index 619d55e..91569f5 100644 --- a/ambithread.c +++ b/ambithread.c @@ -88,7 +88,7 @@ void cAmbiThread::Action() { MsTime start = msNow(); - if(softhddeviceNotDetached() == fail) + if(ShutdownHandler.IsUserInactive() || softhddeviceNotDetached() == fail) { bob.close(); waitCondition.TimedWait(mutex, 1000); diff --git a/ambithread.h b/ambithread.h index 9c3ed4c..abc1c58 100644 --- a/ambithread.h +++ b/ambithread.h @@ -20,6 +20,7 @@ #include <queue> #include <vdr/thread.h> +#include <vdr/shutdown.h> #include "common.h" #include "config.h" |