Skip to content

Commit 1df260a

Browse files
committed
Fix ManualFlowControlServer logging during shutdown
1 parent d997e5b commit 1df260a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/src/main/java/io/grpc/examples/manualflowcontrol/ManualFlowControlServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public void onCompleted() {
136136
Runtime.getRuntime().addShutdownHook(new Thread() {
137137
@Override
138138
public void run() {
139-
logger.info("Shutting down");
139+
// Use stderr here since the logger may have been reset by its JVM shutdown hook.
140+
System.err.println("Shutting down");
140141
try {
141142
server.shutdown().awaitTermination(30, TimeUnit.SECONDS);
142143
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)