Skip to content

Commit 747c231

Browse files
committed
Refactor
1 parent dc51967 commit 747c231

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/client.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -920,10 +920,7 @@ export class ClientImpl {
920920
);
921921

922922
const remaining = bytes + read - size;
923-
if (remaining <= 0) {
924-
callback(row);
925-
row = null;
926-
} else {
923+
if (remaining > 0) {
927924
const offset = startRowData + end;
928925
buffer.writeInt8(mtype, offset - 7);
929926
buffer.writeInt32BE(bytes - end - 1, offset - 6);
@@ -933,6 +930,9 @@ export class ClientImpl {
933930
return read + end;
934931
}
935932

933+
callback(row);
934+
row = null;
935+
936936
// Keep track of how much data we've consumed.
937937
frame += bytes;
938938
read += bytes;

0 commit comments

Comments
 (0)