Fix SQLite queue

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-19 15:05:46 +02:00
parent 28b070dafc
commit 598455f8d3
2 changed files with 11 additions and 5 deletions
+7 -5
View File
@@ -195,16 +195,18 @@ func (b *Broker) SaveEntry(f *proxy.Flow) {
if config.Global.History.SkipDuplicates {
var dup bool
entry, dup, err = d.InsertIfNotDuplicate(pending, body)
if dup || err != nil {
if dup {
return
}
} else {
entry, err = d.InsertEntry(pending, body)
}
if err == nil {
if cb := b.onNewEntry; cb != nil {
go cb(entry)
}
if err != nil {
log.Printf("intercept: failed to save history entry: %v", err)
return
}
if cb := b.onNewEntry; cb != nil {
go cb(entry)
}
}