Преглед на файлове

delete ext client from cache if not in db

Abhishek Kondur преди 1 година
родител
ревизия
bbd624d04f
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      logic/extpeers.go

+ 3 - 0
logic/extpeers.go

@@ -76,6 +76,9 @@ func DeleteExtClient(network string, clientid string) error {
 	}
 	err = database.DeleteRecord(database.EXT_CLIENT_TABLE_NAME, key)
 	if err != nil {
+		if database.IsEmptyRecord(err) {
+			deleteExtClientFromCache(key)
+		}
 		return err
 	}
 	deleteExtClientFromCache(key)