Skip to content

Commit

Permalink
fix: skip error expiring used preauthkey #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Rawlings committed Nov 16, 2023
1 parent 0d5d85a commit 1632ee3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ func (h *HeadscaleService) ExpirePreAuthKey(ctx context.Context, user string, ke
return nil
}
}
if e, ok := err.(*headscale_service.HeadscaleServiceExpirePreAuthKeyDefault); ok {
if strings.Contains(e.Payload.Message, "AuthKey has already been used") {
return nil
}
}
return err
}
return nil
Expand Down

0 comments on commit 1632ee3

Please sign in to comment.