Преглед изворни кода

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)