git ssb

2+

Dominic / ssb-client



Commit 2b357a0abf8cd06b2aed2d9ce2eb76069888fd71

readyCb no longer needed

Dominic Tarr committed on 3/6/2015, 7:30:13 PM
Parent: 93989fb4f2182e5c9a2df88cc6f8dc7efb421a06

Files changed

index.jschanged
index.jsView
@@ -10,9 +10,13 @@
1010 function isFunction (f) {
1111 return 'function' === typeof f
1212 }
1313
14-module.exports = function (keys, config, readyCb) {
14 +function throwIfError(err) {
15 + if(err) throw err
16 +}
17 +
18 +module.exports = function (keys, config) {
1519 var manifest
1620 //if we are in the browser
1721 config.host = config.host || 'localhost'
1822 var client = muxrpc(loadManf(config), false, serialize)()
@@ -67,11 +71,9 @@
6771 }
6872
6973 client.close = function(cb) {
7074 wsStream.close()
71- rpcStream.close(function () {
72- cb && cb()
73- })
75 + rpcStream.close(cb ? cb : throwIfError)
7476 return client
7577 }
7678
7779 client.reconnect = function(opts) {

Built with git-ssb-web