Skip to content
This repository was archived by the owner on Sep 11, 2021. It is now read-only.

Commit 866f784

Browse files
committed
add .end()
1 parent fd5dad9 commit 866f784

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: lib/connection.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ Connection.prototype.end = function () {
309309
// 0x58 = 'X'
310310
this.writer.add(emptyBuffer)
311311
this._ending = true
312-
return this.stream.write(END_BUFFER)
312+
this.stream.write(END_BUFFER)
313+
return this.stream.end()
313314
}
314315

315316
Connection.prototype.close = function (msg, more) {

Diff for: test/unit/test-helper.js

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ p.write = function (packet) {
1717
this.packets.push(packet)
1818
}
1919

20+
p.end = function () {}
21+
2022
p.setKeepAlive = function () {}
2123

2224
p.writable = true

0 commit comments

Comments
 (0)