mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-15 09:19:21 +02:00
13 lines
302 B
Go
13 lines
302 B
Go
|
package observatory
|
||
|
|
||
|
func (o *Observer) UpdateStatus(result *OutboundStatus) {
|
||
|
o.statusLock.Lock()
|
||
|
defer o.statusLock.Unlock()
|
||
|
|
||
|
if location := o.findStatusLocationLockHolderOnly(result.OutboundTag); location != -1 {
|
||
|
o.status[location] = result
|
||
|
} else {
|
||
|
o.status = append(o.status, result)
|
||
|
}
|
||
|
}
|