Skip to content

Commit 653ac1e

Browse files
committed
log when channel not shutdown.
1 parent 8be7eec commit 653ac1e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

s2a/src/main/java/io/grpc/s2a/channel/S2AHandshakerServiceChannel.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import java.time.Duration;
3333
import java.util.Optional;
3434
import java.util.concurrent.ConcurrentMap;
35+
import java.util.logging.Level;
36+
import java.util.logging.Logger;
3537
import javax.annotation.concurrent.ThreadSafe;
3638

3739
/**
@@ -132,6 +134,8 @@ public String toString() {
132134
*/
133135
@VisibleForTesting
134136
static class HandshakerServiceChannel extends Channel {
137+
private static final Logger logger =
138+
Logger.getLogger(S2AHandshakerServiceChannel.class.getName());
135139
private final ManagedChannel delegate;
136140

137141
static HandshakerServiceChannel create(ManagedChannel delegate) {
@@ -166,6 +170,7 @@ public void close() {
166170
delegate.awaitTermination(CHANNEL_SHUTDOWN_TIMEOUT.getSeconds(), SECONDS);
167171
} catch (InterruptedException e) {
168172
Thread.currentThread().interrupt();
173+
logger.log(Level.WARNING, "Channel to S2A was not shutdown.");
169174
}
170175
}
171176
}

0 commit comments

Comments
 (0)