mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
fix service api (#556)
* fix service api * update ServiceResponseItem * fix: ddns lock
This commit is contained in:
1 parent
47099b617e
commit
4ddad9ea00
10 files changed
+124
-53
No files matched your search
@@ -19,6 +19,7 @@ var (
|
||||
DDNSCache map[uint64]*model.DDNSProfile
|
||||
DDNSCacheLock sync.RWMutex
|
||||
DDNSList []*model.DDNSProfile
|
||||
DDNSListLock sync.RWMutex
|
||||
)
|
||||
|
||||
func initDDNS() {
|
||||
@@ -52,6 +53,9 @@ func UpdateDDNSList() {
|
||||
DDNSCacheLock.RLock()
|
||||
defer DDNSCacheLock.RUnlock()
|
||||
|
||||
DDNSListLock.Lock()
|
||||
defer DDNSListLock.Unlock()
|
||||
|
||||
DDNSList = make([]*model.DDNSProfile, 0, len(DDNSCache))
|
||||
for _, p := range DDNSCache {
|
||||
DDNSList = append(DDNSList, p)
|
||||
|
||||
Reference in new issue
Block a user