Skip to content

Commit 11e875f

Browse files
Update agent.go
1 parent eb57ac0 commit 11e875f

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

packages/cmd/agent.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -777,16 +777,7 @@ func (tm *AgentManager) RevokeCredentials() error {
777777

778778
log.Info().Msg("revoking credentials...")
779779

780-
for i := 0; i < 20; i++ {
781-
token = tm.GetToken()
782-
783-
if token == "" {
784-
time.Sleep(1 * time.Second)
785-
continue
786-
}
787-
788-
break
789-
}
780+
token = tm.GetToken()
790781

791782
if token == "" {
792783
return fmt.Errorf("no access token found")
@@ -1242,7 +1233,7 @@ var agentCmd = &cobra.Command{
12421233

12431234
tokenRefreshNotifier := make(chan bool)
12441235
sigChan := make(chan os.Signal, 1)
1245-
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
1236+
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, os.Interrupt)
12461237

12471238
filePaths := agentConfig.Sinks
12481239

0 commit comments

Comments
 (0)