mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-05 00:50: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
@@ -14,6 +14,7 @@ var (
|
||||
|
||||
NATIDToDomain = make(map[uint64]string)
|
||||
NATList []*model.NAT
|
||||
NATListLock sync.RWMutex
|
||||
)
|
||||
|
||||
func initNAT() {
|
||||
@@ -55,6 +56,9 @@ func UpdateNATList() {
|
||||
NATCacheRwLock.RLock()
|
||||
defer NATCacheRwLock.RUnlock()
|
||||
|
||||
NATListLock.Lock()
|
||||
defer NATListLock.Unlock()
|
||||
|
||||
NATList = make([]*model.NAT, 0, len(NATCache))
|
||||
for _, n := range NATCache {
|
||||
NATList = append(NATList, n)
|
||||
|
||||
Reference in new issue
Block a user