Example usage for io.netty.handler.codec.http2 Http2Connection goAwaySent

List of usage examples for io.netty.handler.codec.http2 Http2Connection goAwaySent

Introduction

In this page you can find the example usage for io.netty.handler.codec.http2 Http2Connection goAwaySent.

Prototype

boolean goAwaySent();

Source Link

Document

Indicates whether or not a GOAWAY was sent to the remote endpoint.

Usage

From source file:io.vertx.core.http.impl.Http2ClientConnection.java

License:Open Source License

@Override
public boolean isValid() {
    Http2Connection conn = handler.connection();
    return !isClosed() && !conn.goAwaySent() && !conn.goAwayReceived();
}

From source file:io.vertx.core.http.impl.Http2ConnectionBase.java

License:Open Source License

private void checkShutdownHandler() {
    if (!shutdown) {
        Http2Connection conn = handler.connection();
        if ((conn.goAwayReceived() || conn.goAwaySent()) && conn.numActiveStreams() == 0) {
            shutdown = true;//from  w w w. j  a  v  a 2 s .  c  om
            Handler<Void> handler = shutdownHandler;
            if (handler != null) {
                context.executeFromIO(() -> {
                    shutdownHandler.handle(null);
                });
            }
        }
    }
}