Skip to content

Commit 67e3548

Browse files
authored
Merge pull request #75 from Jefftree/patch-2
Fix warning message if agent disconnects
2 parents 4ad355b + 6c65e12 commit 67e3548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/agent/agentserver/backend_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (s *DefaultBackendManager) RemoveBackend(agentID string, conn agent.AgentSe
128128
for i, c := range backends {
129129
if c.conn == conn {
130130
s.backends[agentID] = append(s.backends[agentID][:i], s.backends[agentID][i+1:]...)
131-
if i == 0 && len(s.backends) != 0 {
131+
if i == 0 && len(s.backends[agentID]) != 0 {
132132
klog.Warningf("this should not happen. Removed connection %v that is not the first connection, remaining connections are %v", conn, s.backends[agentID])
133133
}
134134
found = true

0 commit comments

Comments
 (0)