Skip to content

Commit 437c0f0

Browse files
committed
fix
1 parent 7a03824 commit 437c0f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/cliui/agent.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ func Agent(ctx context.Context, writer io.Writer, opts AgentOptions) error {
4444
return
4545
case <-t.C:
4646
agent, err := opts.Fetch(ctx)
47-
if err != nil {
48-
fetchedAgent <- fetchAgent{err: xerrors.Errorf("fetch workspace agent: %w", err)}
49-
return
50-
}
5147
select {
5248
case <-fetchedAgent:
5349
default:
5450
}
51+
if err != nil {
52+
fetchedAgent <- fetchAgent{err: xerrors.Errorf("fetch workspace agent: %w", err)}
53+
return
54+
}
5555
fetchedAgent <- fetchAgent{agent: agent}
5656
t.Reset(opts.FetchInterval)
5757
}

0 commit comments

Comments
 (0)