Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 03c3b38

Browse files
committedMay 13, 2025··
fix(nginx): correct dynamic module loading status handling
1 parent f36a210 commit 03c3b38

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed
 

‎internal/nginx/modules.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,7 @@ func updateDynamicModulesStatus() {
112112
moduleName = strings.TrimPrefix(moduleName, "ngx_")
113113
moduleName = strings.TrimSuffix(moduleName, "_module")
114114
loadedDynamicModules[moduleName] = true
115-
}
116-
}
117-
118-
// Update the status for each module in the cache
119-
for key := range modulesCache.Keys() {
120-
// If the module is already marked as dynamic, check if it's actually loaded
121-
if loadedDynamicModules[key] {
122-
module, ok := modulesCache.Get(key)
115+
module, ok := modulesCache.Get(moduleName)
123116
if ok {
124117
module.Loaded = true
125118
}
@@ -190,7 +183,7 @@ func GetModules() *orderedmap.OrderedMap[string, *Module] {
190183
Name: module,
191184
Params: params,
192185
Dynamic: isDynamic,
193-
Loaded: !isDynamic || isDynamic, // Static modules are always loaded, dynamic need to be checked
186+
Loaded: !isDynamic, // Static modules are always loaded
194187
})
195188
}
196189
}

0 commit comments

Comments
 (0)
Please sign in to comment.