alts: temporarily revert protocol negotiation to work with servers

This commit is contained in:
Carl Mastrangelo 2019-06-18 10:25:46 -07:00 committed by GitHub
parent 9c9ca659d4
commit c78907a9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,8 @@ public final class TsiHandshakeHandler extends ByteToMessageDecoder {
private final HandshakeValidator handshakeValidator;
private final ChannelHandler next;
private ProtocolNegotiationEvent pne;
// TODO(carl-mastrangelo): make this null after NettyServerTransport uses WBAEH
private ProtocolNegotiationEvent pne = InternalProtocolNegotiationEvent.getDefault();
/**
* Constructs a TsiHandshakeHandler.
@ -149,7 +150,8 @@ public final class TsiHandshakeHandler extends ByteToMessageDecoder {
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof ProtocolNegotiationEvent) {
checkState(pne == null, "negotiation already started");
// TODO(carl-mastrangelo): re-enable after NettyServerTransport uses WBAEH
// checkState(pne == null, "negotiation already started");
pne = (ProtocolNegotiationEvent) evt;
} else {
super.userEventTriggered(ctx, evt);