Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow RawMessage's payload to be empty (but not null) #1995
RawMessage previously threw an exception when the payload was empty during construction. This lead to errors in the call sites, which, depending on the input, could cause connections and/or threads to be closed, e.g. the Kafka consumer would be shut down.
With this change we accept empty payloads, but discard them before inserting them into the input buffer. Since this happens in a central place we should cover all available inputs.
This change also improved the exception logging in the NettyTransport, where we now are way less verbose when faced with a "Connection reset by peer". We don't currently write significant information back to the client so we don't need to log the entire (meaningless) stacktrace here. The information is still available on TRACE.