db/update/InotifyQueue: catch UpdateService::Enqueue() exceptions
This commit is contained in:
parent
2677b90244
commit
3c4ed9cbe3
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
ver 0.21.4 (not yet released)
|
ver 0.21.4 (not yet released)
|
||||||
* database
|
* database
|
||||||
|
- inotify: fix crash bug "terminate called after throwing ..."
|
||||||
- upnp: implement "list ... group"
|
- upnp: implement "list ... group"
|
||||||
* output
|
* output
|
||||||
- httpd: declare protocol "HTTP/1.1" instead of "ICY"
|
- httpd: declare protocol "HTTP/1.1" instead of "ICY"
|
||||||
|
@ -39,7 +39,15 @@ InotifyQueue::OnDelay() noexcept
|
|||||||
while (!queue.empty()) {
|
while (!queue.empty()) {
|
||||||
const char *uri_utf8 = queue.front().c_str();
|
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) {
|
if (id == 0) {
|
||||||
/* retry later */
|
/* retry later */
|
||||||
delay_event.Schedule(INOTIFY_UPDATE_DELAY);
|
delay_event.Schedule(INOTIFY_UPDATE_DELAY);
|
||||||
|
Loading…
Reference in New Issue
Block a user