mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-21 20:59:02 +00:00
server: always send binary ids
This commit is contained in:
parent
749cee1465
commit
340b3faff2
@ -275,7 +275,7 @@ Server.prototype._onWebSocketRequest = function (socket, params) {
|
||||
} catch (err) {
|
||||
socket.send(JSON.stringify({
|
||||
'failure reason': err.message,
|
||||
info_hash: params.info_hash
|
||||
info_hash: common.hexToBinary(params.info_hash)
|
||||
}), socket.onSend)
|
||||
|
||||
// even though it's an error for the client, it's just a warning for the server.
|
||||
@ -302,7 +302,7 @@ Server.prototype._onWebSocketRequest = function (socket, params) {
|
||||
var peers = response.peers
|
||||
delete response.peers
|
||||
response.interval = self._intervalMs
|
||||
response.info_hash = params.info_hash // as hex
|
||||
response.info_hash = common.hexToBinary(params.info_hash)
|
||||
|
||||
socket.send(JSON.stringify(response), socket.onSend)
|
||||
debug('sent response %s to %s', JSON.stringify(response), params.peer_id)
|
||||
|
Loading…
Reference in New Issue
Block a user