@@ -28,14 +28,14 @@ function sendFstReq(serverPort) {
2828 agent,
2929host : '127.0.0.1' ,
3030port : serverPort ,
31- } , ( res ) => {
31+ } , common . mustCall ( ( res ) => {
3232res . on ( 'data' , noop ) ;
3333res . on ( 'end' , common . mustCall ( ( ) => {
3434// Agent's socket reusing code is registered to process.nextTick(),
3535// and will be run after this function, make sure it take effect.
3636setImmediate ( sendSecReq , serverPort , req . socket . localPort ) ;
3737} ) ) ;
38- } ) ;
38+ } ) ) ;
3939
4040// Make the `req.socket` non drained, i.e. has some data queued to write to
4141// and accept by the kernel. In Linux and Mac, we only need to call `req.end(aLargeBuffer)`.
@@ -60,8 +60,8 @@ function sendFstReq(serverPort) {
6060 * back the socket within SO_SNDBUF quota or only one outstanding send condition.
6161 */
6262
63- req . on ( 'socket' , ( ) => {
64- req . socket . on ( 'connect' , ( ) => {
63+ req . on ( 'socket' , common . mustCall ( ( ) => {
64+ req . socket . on ( 'connect' , common . mustCall ( ( ) => {
6565// Print tcp send buffer information
6666console . log ( process . report . getReport ( ) . libuv . filter ( ( handle ) => handle . type === 'tcp' ) ) ;
6767
@@ -81,8 +81,8 @@ function sendFstReq(serverPort) {
8181
8282req . end ( dataLargerThanTCPSendBuf ) ;
8383assert . ok ( req . socket . writableLength > 0 ) ;
84- } ) ;
85- } ) ;
84+ } ) ) ;
85+ } ) ) ;
8686}
8787
8888function sendSecReq ( serverPort , fstReqCliPort ) {
@@ -92,12 +92,12 @@ function sendSecReq(serverPort, fstReqCliPort) {
9292 agent,
9393host : '127.0.0.1' ,
9494port : serverPort ,
95- } , ( res ) => {
95+ } , common . mustCall ( ( res ) => {
9696res . on ( 'data' , noop ) ;
9797res . on ( 'end' , common . mustCall ( ( ) => {
9898setImmediate ( sendThrReq , serverPort , req . socket . localPort ) ;
9999} ) ) ;
100- } ) ;
100+ } ) ) ;
101101
102102req . on ( 'socket' , common . mustCall ( ( sock ) => {
103103assert . notStrictEqual ( sock . localPort , fstReqCliPort ) ;
0 commit comments