helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.52k stars 564 forks source link

RST_STREAM sent by a Server Streaming client does not signal the gRPC layer #9496

Open mattp-swirldslabs opened 1 week ago

mattp-swirldslabs commented 1 week ago

Environment Details


Problem Description

RST_STREAM sent by a Server Streaming client does not signal the gRPC layer

Steps to reproduce:

1) Start a Server Streaming connection to Helidon using a client like Postman and confirm you're receiving streaming data from the server. 2) Place a breakpoint in the Http2ServerStream.rstStream() method 3) Use the Postman cancel button to send a rst_stream to terminate the connection 4) The state changes to CLOSED but the Http2StreamWriter (passed here: https://github.com/helidon-io/helidon/blob/51b942a90aa9f2416ce6b32687748ee2b7701e75/webserver/http2/src/main/java/io/helidon/webserver/http2/spi/Http2SubProtocolSelector.java#L60) continues to accept data from the gRPC layer. 5) Our application above the gRPC layer needs an exception or some signal from Helidon to know that it needs to stop streaming data.