File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2020// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121
2222'use strict' ;
23- const common = require ( '../common' ) ;
23+ require ( '../common' ) ;
2424const assert = require ( 'assert' ) ;
2525const net = require ( 'net' ) ;
2626
@@ -43,7 +43,7 @@ const server = net.createServer((connection) => {
4343} ) ;
4444
4545server . on ( 'listening' , ( ) => {
46- const client = net . createConnection ( common . PORT ) ;
46+ const client = net . createConnection ( server . address ( ) . port ) ;
4747 client . setEncoding ( 'ascii' ) ;
4848 client . on ( 'data' , ( d ) => {
4949 console . log ( d ) ;
@@ -83,7 +83,7 @@ server.on('listening', () => {
8383 client . end ( ) ;
8484 } ) ;
8585} ) ;
86- server . listen ( common . PORT ) ;
86+ server . listen ( 0 ) ;
8787
8888process . on ( 'exit' , ( ) => {
8989 assert . strictEqual ( recv . length , N ) ;
You can’t perform that action at this time.
0 commit comments