mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
remove unneeded timeout
This commit is contained in:
parent
1b22b53fe8
commit
29d4564bbd
@ -20,12 +20,10 @@ function Swarm (infoHash, server) {
|
|||||||
this.peers.on('evict', function (data) {
|
this.peers.on('evict', function (data) {
|
||||||
var peer = data.value
|
var peer = data.value
|
||||||
if (peer.socket) {
|
if (peer.socket) {
|
||||||
setTimeout(function () {
|
try {
|
||||||
try {
|
peer.socket.close()
|
||||||
peer.socket.close()
|
peer.socket = null
|
||||||
peer.socket = null
|
} catch (err) {}
|
||||||
} catch (err) {}
|
|
||||||
}, 1000)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,7 @@ function serverTest (t, serverType, serverFamily) {
|
|||||||
: '127.0.0.1'
|
: '127.0.0.1'
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
serverType: serverType,
|
serverType: serverType
|
||||||
peersCacheLength: 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
common.createServer(t, opts, function (server) {
|
common.createServer(t, opts, function (server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user