mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user