Skip to content

Commit 0a214b8

Browse files
committed
improve error message
1 parent 208a572 commit 0a214b8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/sender.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class Sender {
176176
if (pos > 0) {
177177
this.log(
178178
"warn",
179-
`Buffer contains data which has not been flushed, and it will be lost [position=${pos}]`,
179+
`Buffer contains data which has not been flushed before closing the sender, and it will be lost [position=${pos}]`,
180180
);
181181
}
182182
return this.transport.close();

test/sender.transport.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ describe("Sender TCP suite", function () {
575575
// we expect a warning about non-flushed data at close()
576576
const expectedMessages = [
577577
"Successfully connected to localhost:9088",
578-
"Buffer contains data which has not been flushed, and it will be lost [position=54]",
578+
"Buffer contains data which has not been flushed before closing the sender, and it will be lost [position=54]",
579579
/^Connection to .*1:9088 is closed$/,
580580
];
581581
const log = (

0 commit comments

Comments
 (0)