diff options
Diffstat (limited to 'src/lib/hints.cc')
| -rw-r--r-- | src/lib/hints.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/hints.cc b/src/lib/hints.cc index cf14f0699..a9b9d6f54 100644 --- a/src/lib/hints.cc +++ b/src/lib/hints.cc @@ -273,20 +273,24 @@ Hints::thread () struct timeval last_pulse; gettimeofday (&last_pulse, 0); - while (!player->pass()) { - - struct timeval now; - gettimeofday (&now, 0); - if ((seconds(now) - seconds(last_pulse)) > 1) { - { - boost::mutex::scoped_lock lm (_mutex); - if (_stop) { - break; + try { + while (!player->pass()) { + + struct timeval now; + gettimeofday (&now, 0); + if ((seconds(now) - seconds(last_pulse)) > 1) { + { + boost::mutex::scoped_lock lm (_mutex); + if (_stop) { + break; + } } + emit (bind (boost::ref(Pulse))); + last_pulse = now; } - emit (bind (boost::ref(Pulse))); - last_pulse = now; } + } catch (...) { + store_current (); } emit (bind(boost::ref(Finished))); |
