Skip to content

Commit

Permalink
log when channel not shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Sep 20, 2024
1 parent 8be7eec commit 653ac1e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.time.Duration;
import java.util.Optional;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;

/**
Expand Down Expand Up @@ -132,6 +134,8 @@ public String toString() {
*/
@VisibleForTesting
static class HandshakerServiceChannel extends Channel {
private static final Logger logger =
Logger.getLogger(S2AHandshakerServiceChannel.class.getName());
private final ManagedChannel delegate;

static HandshakerServiceChannel create(ManagedChannel delegate) {
Expand Down Expand Up @@ -166,6 +170,7 @@ public void close() {
delegate.awaitTermination(CHANNEL_SHUTDOWN_TIMEOUT.getSeconds(), SECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
logger.log(Level.WARNING, "Channel to S2A was not shutdown.");
}
}
}
Expand Down

0 comments on commit 653ac1e

Please sign in to comment.