File tree Expand file tree Collapse file tree
core/src/main/java/io/grpc/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494public final class ServerImpl extends io .grpc .Server implements InternalInstrumented <ServerStats > {
9595 private static final Logger log = Logger .getLogger (ServerImpl .class .getName ());
9696 private static final ServerStreamListener NOOP_LISTENER = new NoopListener ();
97+ private static final Attributes .Key <InternalServer > TRANSPORT_SERVER_ATTR =
98+ Attributes .Key .create ("io.grpc.Grpc.TRANSPORT_ATTR_SERVER_TRANSPORT" );
9799
98100 private final InternalLogId logId ;
99101 private final ObjectPool <? extends Executor > executorPool ;
@@ -438,6 +440,10 @@ public Attributes transportReady(Attributes attributes) {
438440 handshakeTimeoutFuture .cancel (false );
439441 handshakeTimeoutFuture = null ;
440442
443+ final Attributes .Builder builder = attributes .toBuilder ();
444+ builder .set (TRANSPORT_SERVER_ATTR , transportServer );
445+ attributes = builder .build ();
446+
441447 for (ServerTransportFilter filter : transportFilters ) {
442448 attributes = Preconditions .checkNotNull (filter .transportReady (attributes ),
443449 "Filter %s returned null" , filter );
You can’t perform that action at this time.
0 commit comments