Modify x-pack to for `TransportChannel` changes (elastic/x-pack-elasticsearch#3013)
This is related to elastic/elasticsearch#elastic/x-pack-elasticsearch#27388. It modifies x-pack to
be compatible with the removal of the delegating transport channel.
Original commit: elastic/x-pack-elasticsearch@4d1fbdbfbfd43877db723f69151b59d7cccb11df
@@ -19,7 +19,7 @@ import org.elasticsearch.action.admin.indices.open.OpenIndexAction;
import org.elasticsearch.action.support.DestructiveOperations;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.transport.DelegatingTransportChannel;
+import org.elasticsearch.transport.TaskTransportChannel;
import org.elasticsearch.transport.TcpTransportChannel;
import org.elasticsearch.transport.TransportChannel;
import org.elasticsearch.transport.TransportRequest;
@@ -110,8 +110,8 @@ public interface ServerTransportFilter {
String securityAction = actionMapper.action(action, request);
TransportChannel unwrappedChannel = transportChannel;
- while (unwrappedChannel instanceof DelegatingTransportChannel) {
- unwrappedChannel = ((DelegatingTransportChannel) unwrappedChannel).getChannel();
+ if (unwrappedChannel instanceof TaskTransportChannel) {
+ unwrappedChannel = ((TaskTransportChannel) unwrappedChannel).getChannel();
}
if (extractClientCert && (unwrappedChannel instanceof TcpTransportChannel) &&
