@@ -482,11 +482,8 @@ describe('new Connection()', function () {
482
482
opCode : msg . readInt32LE ( 12 )
483
483
} ;
484
484
const msgBody = msg . subarray ( 16 ) ;
485
- try {
486
- connection . onMessage ( new BinMsg ( msg , msgHeader , msgBody ) ) ;
487
- } catch {
488
- // regardless of outcome
489
- }
485
+ msgBody . writeInt32LE ( 0 , 0 ) ; // OPTS_MORE_TO_COME
486
+ connection . onMessage ( new BinMsg ( msg , msgHeader , msgBody ) ) ;
490
487
// timeout is still reset
491
488
expect ( connection . stream ) . to . have . property ( 'timeout' , 0 ) ;
492
489
} ) ;
@@ -501,12 +498,8 @@ describe('new Connection()', function () {
501
498
opCode : msg . readInt32LE ( 12 )
502
499
} ;
503
500
const msgBody = msg . subarray ( 16 ) ;
504
- msgBody . writeInt32LE ( 2 ) ; // OPTS_MORE_TO_COME
505
- try {
506
- connection . onMessage ( new BinMsg ( msg , msgHeader , msgBody ) ) ;
507
- } catch {
508
- // regardless of outcome
509
- }
501
+ msgBody . writeInt32LE ( 2 , 0 ) ; // OPTS_MORE_TO_COME
502
+ connection . onMessage ( new BinMsg ( msg , msgHeader , msgBody ) ) ;
510
503
// timeout is still set
511
504
expect ( connection . stream ) . to . have . property ( 'timeout' , 1 ) ;
512
505
} ) ;
0 commit comments