Add one more check for not found dbs
diff --git a/src/smoosh/src/smoosh_channel.erl b/src/smoosh/src/smoosh_channel.erl
index b584736..b5ef19d 100644
--- a/src/smoosh/src/smoosh_channel.erl
+++ b/src/smoosh/src/smoosh_channel.erl
@@ -386,7 +386,12 @@
Requests1 = lists:reverse(Requests0),
Waiting2 = lists:foldl(
fun({DbName, Priority}, Acc) ->
- smoosh_priority_queue:in(DbName, Priority, Priority, Acc)
+ case exists(DbName) of
+ true ->
+ smoosh_priority_queue:in(DbName, Priority, Priority, Acc);
+ false ->
+ Acc
+ end
end,
Waiting1,
Requests1