mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-06 03:38:47 +00:00
Add hook to init and listen observatory statuses
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user