aboutsummaryrefslogtreecommitdiff
path: root/git-remote-gitswarm
diff options
context:
space:
mode:
authorChris Ball <chris@printf.net>2015-05-13 19:21:43 -0400
committerChris Ball <chris@printf.net>2015-05-13 19:21:43 -0400
commita4a9ea1e267396a3d958462f54716f61650281a7 (patch)
tree445c814d52e0f3038e433a677d23f982974f2434 /git-remote-gitswarm
parentfc6dd65738833a3219a4ac8fbe550a0b23ef5761 (diff)
Fix wire.use
Diffstat (limited to 'git-remote-gitswarm')
-rwxr-xr-xgit-remote-gitswarm6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-remote-gitswarm b/git-remote-gitswarm
index 5524518..259baa9 100755
--- a/git-remote-gitswarm
+++ b/git-remote-gitswarm
@@ -33,7 +33,9 @@ exec('git ls-remote ' + url + ' HEAD', function (err, stdout, stderr) {
}
console.warn('Okay, we want to get: ' + ref)
- var dht = new DHT()
+ var dht = new DHT({
+ bootstrap: ['three.printf.net:6882']
+ })
var magnetUri = 'magnet:?xt=urn:btih:' + ref
var parsed = magnet(magnetUri)
dht.on('ready', function () {
@@ -47,7 +49,7 @@ exec('git ls-remote ' + url + ' HEAD', function (err, stdout, stderr) {
var swarm = new Swarm(parsed.infoHash, 'cafebabecafebabecafecafebabecafebabecafe')
swarm.on('wire', function (wire) {
console.error('we got a wire')
- wire.use('ut_gitswarm')
+ wire.use(ut_gitswarm)
// wire.ut_gitswarm.askforsha(parsed.infoHash)
})
})