From d42542006366f6917b751ed2760161bea57ba8ab Mon Sep 17 00:00:00 2001 From: jiangtaoli2016 Date: Mon, 2 Dec 2019 14:55:20 -0800 Subject: [PATCH] alts: fix lazychannel close --- .../main/java/io/grpc/alts/internal/AltsProtocolNegotiator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsProtocolNegotiator.java b/alts/src/main/java/io/grpc/alts/internal/AltsProtocolNegotiator.java index 53749f3e1dd..1e754f7e4f2 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsProtocolNegotiator.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsProtocolNegotiator.java @@ -297,7 +297,7 @@ synchronized Channel get() { /** Returns the cached channel to the channel pool. */ synchronized void close() { if (channel != null) { - channelPool.returnObject(channel); + channel = channelPool.returnObject(channel); } } }