summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-12-28 13:47:18 +0100
committerMax Kellermann <max@musicpd.org>2018-12-28 14:00:58 +0100
commit3c4ed9cbe3a60ea72d2a2fb727576168d3f49b7b (patch)
treeefb4afa44df8c12c6f0666d6e4b3243e82e639d8 /src/db
parent2677b902449b27d90d134d7303cea182de779cbd (diff)
db/update/InotifyQueue: catch UpdateService::Enqueue() exceptions
Diffstat (limited to 'src/db')
-rw-r--r--src/db/update/InotifyQueue.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/db/update/InotifyQueue.cxx b/src/db/update/InotifyQueue.cxx
index 5ce9a2e02..5dd97690a 100644
--- a/src/db/update/InotifyQueue.cxx
+++ b/src/db/update/InotifyQueue.cxx
@@ -39,7 +39,15 @@ InotifyQueue::OnDelay() noexcept
while (!queue.empty()) {
const char *uri_utf8 = queue.front().c_str();
- id = update.Enqueue(uri_utf8, false);
+ try {
+ id = update.Enqueue(uri_utf8, false);
+ } catch (...) {
+ FormatError(std::current_exception(),
+ "Failed to enqueue '%s'", uri_utf8);
+ queue.pop_front();
+ continue;
+ }
+
if (id == 0) {
/* retry later */
delay_event.Schedule(INOTIFY_UPDATE_DELAY);