abcxyz / jvs

Apache License 2.0
8 stars 0 forks source link

fix: add a check on new keys before return shouldRotate #163

Closed sqin2019 closed 1 year ago

sqin2019 commented 1 year ago

fix #160 and some typo.

  1. Adding a check on primary == nil in shouldPromote will promote the newest key if primary is nil regardless of propagation delay.
  2. Adding a check on newest == nil in shouldRotate will stop generating new key if new key already exists regardless of primary key's rotation age.