mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-04 06:52:14 +00:00
clean the code a bit
This commit is contained in:
parent
14d11de201
commit
f08d407bf9
@ -63,10 +63,8 @@ function Swarm () {
|
|||||||
|
|
||||||
// open stream account for connection reuse
|
// open stream account for connection reuse
|
||||||
self.openStream = function (peer, protocol, cb) {
|
self.openStream = function (peer, protocol, cb) {
|
||||||
|
|
||||||
// If no connection open yet, open it
|
// If no connection open yet, open it
|
||||||
if (!self.connections[peer.id.toB58String()]) {
|
if (!self.connections[peer.id.toB58String()]) {
|
||||||
|
|
||||||
// Establish a socket with one of the addresses
|
// Establish a socket with one of the addresses
|
||||||
var socket
|
var socket
|
||||||
async.eachSeries(peer.multiaddrs, function (multiaddr, next) {
|
async.eachSeries(peer.multiaddrs, function (multiaddr, next) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user