@@ -444,6 +444,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
444444
445445 // WebSocket tracker should have a shorter interval – default: 2 minutes
446446 response . interval = Math . ceil ( self . intervalMs / 1000 / 5 )
447+
448+ response . custom = params . custom
447449 }
448450
449451 socket . send ( JSON . stringify ( response ) , socket . onSend )
@@ -458,7 +460,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
458460 offer : params . offers [ i ] . offer ,
459461 offer_id : params . offers [ i ] . offer_id ,
460462 peer_id : common . hexToBinary ( params . peer_id ) ,
461- info_hash : common . hexToBinary ( params . info_hash )
463+ info_hash : common . hexToBinary ( params . info_hash ) ,
464+ custom : params . custom ,
462465 } ) , peer . socket . onSend )
463466 debug ( 'sent offer to %s from %s' , peer . peerId , params . peer_id )
464467 } )
@@ -482,7 +485,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
482485 answer : params . answer ,
483486 offer_id : params . offer_id ,
484487 peer_id : common . hexToBinary ( params . peer_id ) ,
485- info_hash : common . hexToBinary ( params . info_hash )
488+ info_hash : common . hexToBinary ( params . info_hash ) ,
489+ custom : params . custom ,
486490 } ) , toPeer . socket . onSend )
487491 debug ( 'sent answer to %s from %s' , toPeer . peerId , params . peer_id )
488492
0 commit comments