Skip to content

Commit 2132439

Browse files
committed
SWARM-BREAKING: fix crypto server/client orientation
Previously servers were connecting as clients, and clients as servers. This was having an impact (somehow) on holepunched peers. This fixes it so each role behaves as such from a hypercore-protocol perspective.
1 parent 7c3413e commit 2132439

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

swarm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (cabal, opts, cb) {
2525
swarm.on('connection', function (socket, info) {
2626
let remoteKey
2727

28-
var r = cabal.replicate(!info.client)
28+
var r = cabal.replicate(info.client)
2929
pump(socket, r, socket, function (err) {
3030
if (err) debug('ERROR', err)
3131
if (remoteKey) cabal._removeConnection(remoteKey)

0 commit comments

Comments
 (0)