File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ var Client = require('../')
33var common = require ( './common' )
44var fixtures = require ( 'webtorrent-fixtures' )
55var http = require ( 'http' )
6+ var net = require ( 'net' )
67var test = require ( 'tape' )
78
89var peerId1 = Buffer . from ( '01234567890123456789' )
@@ -388,9 +389,9 @@ function testClientStartHttpAgent (t, serverType) {
388389 common . createServer ( t , serverType , function ( server , announceUrl ) {
389390 var agent = new http . Agent ( )
390391 var agentUsed = false
391- agent . createSocket = function ( req , options ) {
392+ agent . createConnection = function ( opts , fn ) {
392393 agentUsed = true
393- return http . Agent . prototype . createSocket . call ( this , req , options )
394+ return net . createConnection ( opts , fn )
394395 }
395396 var client = new Client ( {
396397 infoHash : fixtures . leaves . parsedTorrent . infoHash ,
You can’t perform that action at this time.
0 commit comments