mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 01:32:33 +02:00
Fix SQLite queue
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user