Skip to content

Commit 95df667

Browse files
committed
changed delete logic
1 parent f01ae75 commit 95df667

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

memory_retention.go

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func DeleteKey(key string) error {
4040

4141
delete(keyMap, key)
4242
delete(data, key)
43+
delete(topics, key)
4344
mutex.Unlock()
4445
return nil
4546
}
@@ -62,6 +63,7 @@ func DeleteAnswer(key string) error {
6263
func DeleteAll() {
6364
data = make(map[string][]string)
6465
keyMap = make(map[string]bool)
66+
topics = make(map[string]string)
6567
}
6668

6769
// Check if the key exists.

0 commit comments

Comments
 (0)