fix(backend): sync limiter on association instead of connection

Reverted the full sync on connection hook. Instead, ensureLimiterOnNode is called within syncForwardServices to push limiter configuration immediately before pushing the service configuration that references it.
This commit is contained in:
sagit
2026-02-09 09:06:59 +00:00
parent 3d7a0b697d
commit 3420dc5460
3 changed files with 23 additions and 42 deletions
-6
View File
@@ -71,8 +71,6 @@ type Server struct {
nodes map[int64]*nodeSession
byConn map[*websocket.Conn]*nodeSession
pending map[string]pendingRequest
OnNodeConnected func(nodeID int64)
}
func NewServer(repo *sqlite.Repository, jwtSecret string) *Server {
@@ -166,10 +164,6 @@ func (s *Server) handleNode(w http.ResponseWriter, r *http.Request, nodeID int64
_ = s.repo.UpdateNodeOnline(nodeID, 1, version, httpVal, tlsVal, socksVal)
s.broadcastStatus(nodeID, 1)
if s.OnNodeConnected != nil {
go s.OnNodeConnected(nodeID)
}
defer func() {
needOfflineBroadcast := false
s.mu.Lock()