diff --git a/src/db/update/InotifyQueue.cxx b/src/db/update/InotifyQueue.cxx
index 5dd97690a..84b576b2e 100644
--- a/src/db/update/InotifyQueue.cxx
+++ b/src/db/update/InotifyQueue.cxx
@@ -21,6 +21,7 @@
 #include "InotifyDomain.hxx"
 #include "Service.hxx"
 #include "Log.hxx"
+#include "protocol/Ack.hxx" // for class ProtocolError
 #include "util/StringCompare.hxx"
 
 /**
@@ -40,7 +41,17 @@ InotifyQueue::OnDelay() noexcept
 		const char *uri_utf8 = queue.front().c_str();
 
 		try {
-			id = update.Enqueue(uri_utf8, false);
+			try {
+				id = update.Enqueue(uri_utf8, false);
+			} catch (const ProtocolError &e) {
+				if (e.GetCode() == ACK_ERROR_UPDATE_ALREADY) {
+					/* retry later */
+					delay_event.Schedule(INOTIFY_UPDATE_DELAY);
+					return;
+				}
+
+				throw;
+			}
 		} catch (...) {
 			FormatError(std::current_exception(),
 				    "Failed to enqueue '%s'", uri_utf8);
@@ -48,12 +59,6 @@ InotifyQueue::OnDelay() noexcept
 			continue;
 		}
 
-		if (id == 0) {
-			/* retry later */
-			delay_event.Schedule(INOTIFY_UPDATE_DELAY);
-			return;
-		}
-
 		FormatDebug(inotify_domain, "updating '%s' job=%u",
 			    uri_utf8, id);