Skip to content

Commit

Permalink
Fix secret-stack race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbundy committed Mar 4, 2019
1 parent b783f33 commit 629c533
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions test/timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ var rmrf = require('rimraf')
var createSbot = require('ssb-server')
.use(require('..'))

var alice = createSbot({
temp: 'ooo_a',
timeout: 1000,
port: 34597,
keys: ssbKeys.generate()
})
var bob = createSbot({
temp: 'ooo_b',
timeout: 1000,
port: 34598,
keys: ssbKeys.generate()
})

tape('connect', function (t) {
var alice = createSbot({
temp: 'ooo_a',
timeout: 1000,
port: 34597,
keys: ssbKeys.generate()
})
var bob = createSbot({
temp: 'ooo_b',
timeout: 1000,
port: 34598,
keys: ssbKeys.generate()
})

bob.once('multiserver:listening', function () {
bob.publish({type: 'test', ooo: true}, function (err, msg) {
console.log(msg)
Expand Down

0 comments on commit 629c533

Please sign in to comment.