We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44b4a8c commit ed6bc4aCopy full SHA for ed6bc4a
packages/pg-protocol/src/parser.ts
@@ -106,9 +106,6 @@ export class Parser {
106
break
107
}
108
109
- if(buffer === this.buffer) {
110
- this.buffer = Buffer.from(this.buffer)
111
- }
112
if (offset === bufferFullLength) {
113
// No more use for the buffer
114
this.buffer = emptyBuffer
@@ -148,7 +145,7 @@ export class Parser {
148
145
buffer.copy(this.buffer, this.bufferOffset + this.bufferLength)
149
146
this.bufferLength = newLength
150
147
} else {
151
- this.buffer = buffer
+ this.buffer = Buffer.from(buffer)
152
this.bufferOffset = 0
153
this.bufferLength = buffer.byteLength
154
0 commit comments