Move read-lock after function call that also uses that lock
This commit is contained in:
parent
dc9727bfef
commit
81581091e8
@ -1801,13 +1801,13 @@ func (r *restream) GetProcessLog(id app.ProcessID) (*app.Log, error) {
|
||||
}
|
||||
|
||||
func (r *restream) SearchProcessLogHistory(idpattern, refpattern, state string, from, to *time.Time) []app.LogHistorySearchResult {
|
||||
r.lock.RLock()
|
||||
defer r.lock.RUnlock()
|
||||
|
||||
result := []app.LogHistorySearchResult{}
|
||||
|
||||
ids := r.GetProcessIDs(idpattern, refpattern, "", "")
|
||||
|
||||
r.lock.RLock()
|
||||
defer r.lock.RUnlock()
|
||||
|
||||
for _, id := range ids {
|
||||
task, ok := r.tasks[id]
|
||||
if !ok {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user