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

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

Introduction

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

Prototype

boolean goAwayReceived();

Source Link

Document

Indicates whether or not a GOAWAY was received from 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;//  w ww  .j a  v  a2  s . c o m
            Handler<Void> handler = shutdownHandler;
            if (handler != null) {
                context.executeFromIO(() -> {
                    shutdownHandler.handle(null);
                });
            }
        }
    }
}