fix bug: RWMutex not unlocked

This commit is contained in:
Alex 2021-04-13 09:15:59 +08:00 committed by GitHub
parent ce6c455601
commit a72348b348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ func GetApplications() []Application {
// the return value is read-only but it can be casted to *iris.Application. // the return value is read-only but it can be casted to *iris.Application.
apps := make([]Application, 0, len(registeredApps)) apps := make([]Application, 0, len(registeredApps))
copy(apps, registeredApps) copy(apps, registeredApps)
mu.RLock() mu.RUnlock()
return apps return apps
} }