File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ type Task struct {
5555func New () (provider.Provider , error ) {
5656 return & adcClient {
5757 syncTimeout : config .ControllerConfig .ExecADCTimeout .Duration ,
58- translator : & translator.Translator {},
59- configs : make (map [provider.ResourceKind ]adcConfig ),
60- parentRefs : make (map [provider.ResourceKind ][]provider.ResourceKind ),
58+ translator : & translator.Translator {},
59+ configs : make (map [provider.ResourceKind ]adcConfig ),
60+ parentRefs : make (map [provider.ResourceKind ][]provider.ResourceKind ),
6161 }, nil
6262}
6363
@@ -230,7 +230,8 @@ func (d *adcClient) sync(ctx context.Context, task Task) error {
230230}
231231
232232func (d * adcClient ) execADC (ctx context.Context , config adcConfig , args []string ) error {
233- ctxWithTimeout , _ := context .WithTimeout (ctx , config.adc
233+ ctxWithTimeout , cancel := context .WithTimeout (ctx , d .syncTimeout )
234+ defer cancel ()
234235 // todo: use adc config
235236 serverAddr := d .ServerAddr
236237 if config .ServerAddr != "" {
You can’t perform that action at this time.
0 commit comments