@@ -40,8 +40,8 @@ WebSocketTracker.prototype.announce = function (opts) {
4040 return self . _socket . once ( 'connect' , self . announce . bind ( self , opts ) )
4141 }
4242
43- opts . info_hash = self . client . _infoHash . toString ( 'binary' )
44- opts . peer_id = self . client . _peerId . toString ( 'binary' )
43+ opts . info_hash = self . client . _infoHashBinary
44+ opts . peer_id = self . client . _peerIdBinary
4545
4646 // Limit number of offers (temporarily)
4747 // TODO: remove this when we cleanup old RTCPeerConnections cleanly
@@ -112,7 +112,7 @@ WebSocketTracker.prototype._onSocketData = function (data) {
112112 return self . client . emit ( 'warning' , new Error ( 'Invalid tracker response' ) )
113113 }
114114
115- if ( data . info_hash !== self . client . _infoHash . toString ( 'binary' ) ) {
115+ if ( data . info_hash !== self . client . _infoHashBinary ) {
116116 return self . client . emit ( 'warning' , new Error ( 'Invalid tracker response' ) )
117117 }
118118
@@ -160,8 +160,8 @@ WebSocketTracker.prototype._onSocketData = function (data) {
160160 peer . id = common . binaryToHex ( data . peer_id )
161161 peer . once ( 'signal' , function ( answer ) {
162162 var params = {
163- info_hash : self . client . _infoHash . toString ( 'binary' ) ,
164- peer_id : self . client . _peerId . toString ( 'binary' ) ,
163+ info_hash : self . client . _infoHashBinary ,
164+ peer_id : self . client . _peerIdBinary ,
165165 to_peer_id : data . peer_id ,
166166 answer : answer ,
167167 offer_id : data . offer_id
0 commit comments