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) {
|
||||
var peer = data.value
|
||||
if (peer.socket) {
|
||||
setTimeout(function () {
|
||||
try {
|
||||
peer.socket.close()
|
||||
peer.socket = null
|
||||
} catch (err) {}
|
||||
}, 1000)
|
||||
try {
|
||||
peer.socket.close()
|
||||
peer.socket = null
|
||||
} catch (err) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -25,8 +25,7 @@ function serverTest (t, serverType, serverFamily) {
|
||||
: '127.0.0.1'
|
||||
|
||||
var opts = {
|
||||
serverType: serverType,
|
||||
peersCacheLength: 2
|
||||
serverType: serverType
|
||||
}
|
||||
|
||||
common.createServer(t, opts, function (server) {
|
||||
|
Loading…
Reference in New Issue
Block a user