dequeue() unlinks the file, even if it's been unable to parse it.

This commit is contained in:
default 2024-01-04 16:27:07 +01:00
parent 2218889b43
commit 5e2f4e9902
2 changed files with 2 additions and 5 deletions

View file

@ -1982,10 +1982,8 @@ int process_user_queue(snac *snac)
while (xs_list_iter(&p, &fn)) { while (xs_list_iter(&p, &fn)) {
xs *q_item = dequeue(fn); xs *q_item = dequeue(fn);
if (q_item == NULL) { if (q_item == NULL)
snac_log(snac, xs_fmt("process_user_queue q_item error"));
continue; continue;
}
process_user_queue_item(snac, q_item); process_user_queue_item(snac, q_item);
cnt++; cnt++;

3
data.c
View file

@ -2399,8 +2399,7 @@ xs_dict *dequeue(const char *fn)
{ {
xs_dict *obj = queue_get(fn); xs_dict *obj = queue_get(fn);
if (obj != NULL) unlink(fn);
unlink(fn);
return obj; return obj;
} }