소스 검색

Actually track backends in the active map

Dan Williams 9 년 전
부모
커밋
49454d0cfa
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      backend/manager.go

+ 2 - 0
backend/manager.go

@@ -46,6 +46,7 @@ func NewManager(ctx context.Context, sm subnet.Manager, extIface *ExternalInterf
 		ctx:      ctx,
 		sm:       sm,
 		extIface: extIface,
+		active:   make(map[string]Backend),
 	}
 }
 
@@ -69,6 +70,7 @@ func (bm *manager) GetBackend(backendType string) (Backend, error) {
 	if err != nil {
 		return nil, err
 	}
+	bm.active[betype] = be
 
 	bm.wg.Add(1)
 	go func() {