mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
[优化] 提升WS连接稳定性
This commit is contained in:
@@ -359,12 +359,15 @@ func buildNodeView(node *model.Node) *NodeView {
|
||||
}
|
||||
|
||||
func nodeViewLastSeenAt(node *model.Node) any {
|
||||
if node != nil && IsAgentWSConnected(node.NodeID) {
|
||||
return AgentWSConnectedLastSeenValue
|
||||
}
|
||||
if node == nil {
|
||||
return time.Time{}
|
||||
}
|
||||
if node.NodeType == "tunnel_relay" && IsRelayWSConnected(node.NodeID) {
|
||||
return RelayWSConnectedLastSeenValue
|
||||
}
|
||||
if IsAgentWSConnected(node.NodeID) {
|
||||
return AgentWSConnectedLastSeenValue
|
||||
}
|
||||
return node.LastSeenAt
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user