Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
fix: update libp2p-webrtc-star
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Dec 6, 2016
1 parent 29c33aa commit a12db00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const PeerInfo = require('peer-info')
const PeerId = require('peer-id')
const pull = require('pull-stream')

const sigServer = require('libp2p-webrtc-star/src/signalling-server')
let sigS
const signalling = require('libp2p-webrtc-star/src/signalling')
let server

let node
const rawPeer = require('./test/peer.json')
Expand All @@ -17,7 +17,15 @@ gulp.task('libnode:start', (done) => {
let count = 0
const ready = () => ++count === 2 ? done() : null

sigS = sigServer.start(15555, ready)
signalling.start({
port: 15555
}, (err, _server) => {
if (err) {
throw err
}
server = _server
ready()
})

PeerId.createFromJSON(rawPeer, gotId)

Expand Down Expand Up @@ -46,7 +54,7 @@ gulp.task('libnode:stop', (done) => {
if (err) {
throw err
}
sigS.stop(done)
server.stop(done)
})
}, 2000)
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"libp2p-secio": "^0.6.3",
"libp2p-spdy": "^0.10.0",
"libp2p-swarm": "^0.26.3",
"libp2p-webrtc-star": "^0.6.0",
"libp2p-webrtc-star": "^0.7.0",
"libp2p-websockets": "^0.9.1",
"mafmt": "^2.1.2",
"multiaddr": "^2.1.1",
Expand Down

0 comments on commit a12db00

Please sign in to comment.