diff --git a/jraft-extension/rpc-grpc-impl/pom.xml b/jraft-extension/rpc-grpc-impl/pom.xml index 909f14069..02a3fa09b 100644 --- a/jraft-extension/rpc-grpc-impl/pom.xml +++ b/jraft-extension/rpc-grpc-impl/pom.xml @@ -11,7 +11,7 @@ jraft-extension ${project.version} - 1.17.0 + 1.50.2 diff --git a/jraft-extension/rpc-grpc-impl/src/main/java/io/grpc/netty/shaded/io/grpc/netty/NettyConnectionHelper.java b/jraft-extension/rpc-grpc-impl/src/main/java/io/grpc/netty/shaded/io/grpc/netty/NettyConnectionHelper.java index 1e70bfeea..c5d160243 100644 --- a/jraft-extension/rpc-grpc-impl/src/main/java/io/grpc/netty/shaded/io/grpc/netty/NettyConnectionHelper.java +++ b/jraft-extension/rpc-grpc-impl/src/main/java/io/grpc/netty/shaded/io/grpc/netty/NettyConnectionHelper.java @@ -35,10 +35,15 @@ */ public class NettyConnectionHelper { - private static final ReferenceFieldUpdater CHANNEL_GETTER = Updaters + private static final ReferenceFieldUpdater WRITE_QUEUE_GETTER = Updaters .newReferenceFieldUpdater( NettyServerStream.class, - "channel"); + "writeQueue"); + + private static final ReferenceFieldUpdater CHANNEL_GETTER = Updaters + .newReferenceFieldUpdater( + WriteQueue.class, + "channel"); private static final AttributeKey NETTY_CONN_KEY = AttributeKey .valueOf("netty.conn"); @@ -46,7 +51,7 @@ public class NettyConnectionHelper { public static Connection getOrCreateConnection(final ServerStream stream, final List listeners) { if (stream instanceof NettyServerStream) { - return attachChannel(CHANNEL_GETTER.get((NettyServerStream) stream), listeners); + return attachChannel(CHANNEL_GETTER.get(WRITE_QUEUE_GETTER.get((NettyServerStream) stream)), listeners); } return null; }