Commit 3cc25bb165abecd60144dea543ad032b7b60d08d
return after error
Dominic Tarr committed on 7/4/2016, 10:57:00 PMParent: 3566a11b6d8efe57ebe3d858b26ea4cff89b9e67
Files changed
sbot-api.js | changed |
sbot-api.js | ||
---|---|---|
@@ -30,10 +30,14 @@ | ||
30 | 30 | var opts = createConfig() |
31 | 31 | var sbot = null |
32 | 32 | |
33 | 33 | var rec = Reconnect(function (isConn) { |
34 | - createClient(keys, opts, function (err, _sbot) { | |
35 | - if(err) {console.error(err.stack); isConn(err)} | |
34 | + createClient(function (err, _sbot) { | |
35 | + if(err) { | |
36 | + console.error(err.stack) | |
37 | + isConn(err) | |
38 | + return | |
39 | + } | |
36 | 40 | sbot = _sbot |
37 | 41 | sbot.on('closed', function () { |
38 | 42 | sbot = null |
39 | 43 | isConn(new Error('closed')) |
@@ -102,4 +106,6 @@ | ||
102 | 106 | |
103 | 107 | |
104 | 108 | |
105 | 109 | |
110 | + | |
111 | + |
Built with git-ssb-web