netty / netty-incubator-codec-http3

Experimental HTTP3 codec on top of QUIC
Apache License 2.0
170 stars 35 forks source link

Fix Http3FrameToHttpObjectCodec when writing with a void promise #226

Closed yawkat closed 1 year ago

yawkat commented 1 year ago

Motivation:

222 broke writing LastHttpContent with a void promise, because it adds a listener to the promise.

Modification:

Unvoid the write promise if necessary, so that the SHUTDOWN_OUTPUT listener can be added safely. Since the write method is becoming a bit messy, I also added a (hopefully) exhaustive test for it, for all the different branches.

Result:

Writing with a void promise does not fail anymore.

normanmaurer commented 1 year ago

Thanks a lot!