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@3bd7bf6773
This commit is contained in:
Tim Brooks 2017-11-15 09:48:17 -07:00 committed by GitHub
parent 36105231c3
commit 5d47b96905
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import org.elasticsearch.action.admin.indices.open.OpenIndexAction;
import org.elasticsearch.action.support.DestructiveOperations; import org.elasticsearch.action.support.DestructiveOperations;
import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.util.concurrent.ThreadContext; 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.TcpTransportChannel;
import org.elasticsearch.transport.TransportChannel; import org.elasticsearch.transport.TransportChannel;
import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.transport.TransportRequest;
@ -109,8 +109,8 @@ public interface ServerTransportFilter {
String securityAction = actionMapper.action(action, request); String securityAction = actionMapper.action(action, request);
TransportChannel unwrappedChannel = transportChannel; TransportChannel unwrappedChannel = transportChannel;
while (unwrappedChannel instanceof DelegatingTransportChannel) { if (unwrappedChannel instanceof TaskTransportChannel) {
unwrappedChannel = ((DelegatingTransportChannel) unwrappedChannel).getChannel(); unwrappedChannel = ((TaskTransportChannel) unwrappedChannel).getChannel();
} }
if (extractClientCert && (unwrappedChannel instanceof TcpTransportChannel) && if (extractClientCert && (unwrappedChannel instanceof TcpTransportChannel) &&