File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,15 @@ const { addresses } = require('../common/internet');
5
5
const assert = require ( 'assert' ) ;
6
6
const dgram = require ( 'dgram' ) ;
7
7
8
- const PORT = 12345 ;
9
-
10
8
const client = dgram . createSocket ( 'udp4' ) ;
11
- client . connect ( PORT , addresses . INVALID_HOST , common . mustCall ( ( err ) => {
9
+ client . connect ( common . PORT , addresses . INVALID_HOST , common . mustCall ( ( err ) => {
12
10
assert . ok ( err . code === 'ENOTFOUND' || err . code === 'EAI_AGAIN' ) ;
13
11
14
12
client . once ( 'error' , common . mustCall ( ( err ) => {
15
13
assert . ok ( err . code === 'ENOTFOUND' || err . code === 'EAI_AGAIN' ) ;
16
14
client . once ( 'connect' , common . mustCall ( ( ) => client . close ( ) ) ) ;
17
- client . connect ( PORT ) ;
15
+ client . connect ( common . PORT ) ;
18
16
} ) ) ;
19
17
20
- client . connect ( PORT , addresses . INVALID_HOST ) ;
18
+ client . connect ( common . PORT , addresses . INVALID_HOST ) ;
21
19
} ) ) ;
You can’t perform that action at this time.
0 commit comments