Skip to content

Commit

Permalink
xds: shutDown the scheduledExecutorService when the provider is shutd…
Browse files Browse the repository at this point in the history
…own (grpc#8198) (grpc#8200)
  • Loading branch information
sanjaypujare committed May 24, 2021
1 parent f9c6d5e commit 419c191
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void start() {
@Override
public synchronized void close() {
shutdown = true;
scheduledExecutorService.shutdownNow();
if (scheduledFuture != null) {
scheduledFuture.cancel(true);
scheduledFuture = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public void closeDoesNotScheduleNext() throws IOException, CertificateException
.updateCertificate(any(PrivateKey.class), ArgumentMatchers.<X509Certificate>anyList());
verify(mockWatcher, never()).updateTrustedRoots(ArgumentMatchers.<X509Certificate>anyList());
verify(timeService, never()).schedule(any(Runnable.class), any(Long.TYPE), any(TimeUnit.class));
verify(timeService, times(1)).shutdownNow();
}


Expand Down

0 comments on commit 419c191

Please sign in to comment.