feat: enhance context cancellation handling

This commit is contained in:
Fu Diwei
2025-04-23 19:32:21 +08:00
parent a90b6a8589
commit 97f102533c
31 changed files with 287 additions and 57 deletions

View File

@@ -93,6 +93,12 @@ func (u *UploaderProvider) getCertIfExists(ctx context.Context, certPEM string)
sslCenterListPage := int32(1)
sslCenterListPerPage := int32(100)
for {
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
}
sslCenterListReq := &rainyunsdk.SslCenterListRequest{
Filters: &rainyunsdk.SslCenterListFilters{
Domain: &certX509.Subject.CommonName,