Merge pull request #9 from fivetran/robust-shutdown

fix(leases): robustify lease coordinator shutdown
This commit is contained in:
bencvdb 2021-07-07 15:17:10 -07:00 committed by GitHub
commit 5bed718bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -322,7 +322,7 @@ public class LeaseCoordinator<T extends Lease> {
* Requests the cancellation of the lease taker. * Requests the cancellation of the lease taker.
*/ */
public void stopLeaseTaker() { public void stopLeaseTaker() {
takerFuture.cancel(false); if (takerFuture != null) takerFuture.cancel(false);
} }