Merge pull request #15508 from kim-sung-jee/fix/max-packet-length-exceeded

fix(microservices): report correct buffer length in exception
This commit is contained in:
Kamil Mysliwiec
2025-08-07 08:52:49 +02:00
committed by GitHub

View File

@@ -24,8 +24,9 @@ export class JsonSocket extends TcpSocket {
this.buffer += data;
if (this.buffer.length > MAX_BUFFER_SIZE) {
const bufferLength = this.buffer.length;
this.buffer = '';
throw new MaxPacketLengthExceededException(this.buffer.length);
throw new MaxPacketLengthExceededException(bufferLength);
}
if (this.contentLength === null) {