line / armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
https://armeria.dev
Apache License 2.0
4.79k stars 908 forks source link

Preemptively close the channel when receiving SslCloseCompletionEvent #5551

Open yzfeng2020 opened 5 months ago

yzfeng2020 commented 5 months ago

Sometimes a server can throw the following exception io.netty.handler.ssl.SslClosedEngineException: SSLEngine closed already, - a remote peer can send a CLOSE_NOTIFY with its last SSL packet, which immediately closes the SSL engine. Armeria won't know about it until an attempt is made to send a message over that connection. Since the SSL engine is closed by that point, a SslClosedEngineException will be thrown. The right way to handle this is to preemptively close the engine.

jrhee17 commented 5 months ago

discussion ref: https://discord.com/channels/1087271586832318494/1087272728177942629/1223443540982370407