diff options
-rw-r--r-- | alsa-hook/PolicyAlsaHook.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/alsa-hook/PolicyAlsaHook.c b/alsa-hook/PolicyAlsaHook.c index 44f5ce9..146ff5b 100644 --- a/alsa-hook/PolicyAlsaHook.c +++ b/alsa-hook/PolicyAlsaHook.c @@ -111,10 +111,14 @@ static void *LoopInThread(void *handle) { for (;;) { if (afbClient->verbose) printf("ON-MAINLOOP ping=%d\n", count++); - sd_event_run(afbClient->sdLoop, watchdog); - } + int res = sd_event_run(afbClient->sdLoop, watchdog); - return NULL; + if ( res < 0 ) + { + printf("ERROR in LoopInThread \"%i\" Break ON-MAINLOOP.\n", res); + break; + } + } } // lost connect with the AudioDaemon |