mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 10:56:25 +00:00
fix thrown exception when websocket connection is aborted
alternative to https://github.com/feross/bittorrent-tracker/pull/89
This commit is contained in:
parent
e6f9989310
commit
c4ee7aae36
@ -331,7 +331,7 @@ Server.prototype._onWebSocketRequest = function (socket, params) {
|
||||
offer_id: params.offers[i].offer_id,
|
||||
peer_id: common.hexToBinary(params.peer_id),
|
||||
info_hash: common.hexToBinary(params.info_hash)
|
||||
}))
|
||||
}), peer.socket.onSend)
|
||||
debug('sent offer to %s from %s', peer.peerId, params.peer_id)
|
||||
})
|
||||
}
|
||||
@ -353,7 +353,7 @@ Server.prototype._onWebSocketRequest = function (socket, params) {
|
||||
offer_id: params.offer_id,
|
||||
peer_id: common.hexToBinary(params.peer_id),
|
||||
info_hash: common.hexToBinary(params.info_hash)
|
||||
}))
|
||||
}), toPeer.socket.onSend)
|
||||
debug('sent answer to %s from %s', toPeer.peerId, params.peer_id)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user