gotd: assume any response is an ack

This commit is contained in:
Tulir Asokan
2026-03-28 16:44:17 +02:00
parent 472b9df44c
commit abae7b2854
2 changed files with 8 additions and 4 deletions
+6 -4
View File
@@ -10,11 +10,13 @@ func (e *Engine) NotifyAcks(ids []int64) {
defer e.mux.Unlock()
for _, id := range ids {
ch, ok := e.ack[id]
if !ok {
continue
}
e.notifyAckUnlocked(id)
}
}
func (e *Engine) notifyAckUnlocked(id int64) {
ch, ok := e.ack[id]
if ok {
close(ch)
delete(e.ack, id)
}