When a decode error occurs while processing new input, the related transport is closed with the exception, which sets an error condition on the transport. Upon further processing of output, the transport emits a close frame.
If the connection endpoint is bound to the transport at this point, the error condition object from the connection endpoint is used when generating the close frame, even if it contains no error detail (which it doesn't, unless explicitly set by the using code). The close frame emitted which is then emitted has no error condition, giving no indication to the peer (or those debugging the protocol interactions) of there being a problem or what cause it. In this case, sending detail from the transport error condition would be far more useful.
Since the transport and connection form an overall unit in use, the handling should be updated to use the connection error condition only if its still bound and populated, but to otherwise use the transport error condition if set.