fix(nodes): log the inbound the node snapshot removes centrally (#6219)

The orphan sweep deletes a central inbound and the traffic history of every
client on it, but wrote nothing. An inbound that vanishes minutes after being
created is then indistinguishable from one that never arrived, and the only
way to tell them apart is reading the source.

Name the node, tag, id and port so the removal is visible in the panel log.

Co-authored-by: n0ctal <293235942+n0ctal@users.noreply.github.com>
This commit is contained in:
n0ctal
2026-08-16 17:02:50 +05:00
committed by GitHub
parent 5d6d98d1f9
commit 4b0e9f9b60
2 changed files with 53 additions and 0 deletions
+3
View File
@@ -729,6 +729,9 @@ func (s *InboundService) setRemoteTrafficLocked(nodeID int, snap *runtime.Traffi
if unmanagedTag(c.Tag) {
continue
}
// This drops the central inbound and its clients' traffic history, so say
// so: silent removal is indistinguishable from an inbound never arriving.
logger.Warningf("setRemoteTraffic: node %d no longer reports inbound %q (id %d, port %d) — removing it centrally", nodeID, c.Tag, c.Id, c.Port)
var goneEmails []string
if err := tx.Model(xray.ClientTraffic{}).
Where("inbound_id = ?", c.Id).