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

Commit

Permalink
docs: fix readme example (#207)
Browse files Browse the repository at this point in the history
Co-authored-by: saul <saul@organicdesign.nz>
  • Loading branch information
Saul and saul committed Sep 12, 2022
1 parent 84b935b commit 9f7cf76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import all from 'it-all'

// A simple upgrader that just returns the MultiaddrConnection
const upgrader = {
upgradeInbound: maConn => maConn,
upgradeOutbound: maConn => maConn
upgradeInbound: async maConn => maConn,
upgradeOutbound: async maConn => maConn
}

const tcp = new TCP()
Expand All @@ -64,7 +64,7 @@ const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
await listener.listen(addr)
console.log('listening')

const socket = await tcp.dial(addr)
const socket = await tcp.dial(addr, { upgrader })
const values = await pipe(
socket,
all
Expand Down

0 comments on commit 9f7cf76

Please sign in to comment.