Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from xicombd/ready-again
Browse files Browse the repository at this point in the history
Rename callback to ready again
  • Loading branch information
daviddias committed Mar 20, 2016
2 parents 653f747 + c389020 commit 4e4ed4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -17,10 +17,10 @@ function WebSockets () {
options = {}
}

options.connect = options.connect || function noop () {}
options.ready = options.ready || function noop () {}
const maOpts = multiaddr.toOptions()
const conn = new SWS('ws://' + maOpts.host + ':' + maOpts.port)
conn.on('connect', options.connect)
conn.on('connect', options.ready)
conn.getObservedAddrs = () => {
return [multiaddr]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/libp2p-websockets-test.js
Expand Up @@ -90,7 +90,7 @@ describe('libp2p-websockets', function () {
const message = 'Hello World!'

const conn = ws.dial(mh, {
connect: () => {
ready: () => {
conn.send(message)
}
})
Expand Down

0 comments on commit 4e4ed4b

Please sign in to comment.