Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 77849a7

Browse files
authored
Allow passing proxy to createRpcStream (#24)
Ref Level/party#29
1 parent 52f4861 commit 77849a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = function (opts) {
1818
db.emit('flush')
1919
}
2020

21-
function connect (opts) {
22-
return down.createRpcStream(opts, null)
21+
function connect (opts, proxy) {
22+
return down.createRpcStream(opts, proxy)
2323
}
2424

2525
function isFlushed () {

leveldown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ Multilevel.prototype._close = function (cb) {
229229

230230
this._clearRequests(true)
231231
if (this._streaming) {
232-
this._streaming.once('close', cb)
232+
// _streaming: could be a socket and emit 'close' with a
233+
// hadError argument.
234+
this._streaming.once('close', () => cb())
233235
this._streaming.destroy()
234236
} else {
235237
process.nextTick(cb)

0 commit comments

Comments
 (0)