File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -512,8 +512,8 @@ export class Peer extends EventEmitter {
512
512
_onSocketData ( data : Buffer ) {
513
513
if ( this . _closed ) return
514
514
this . _socketData . append ( data )
515
- while ( this . _socketData . length >= this . _nextPacketSize ) {
516
- try {
515
+ try {
516
+ while ( this . _socketData . length >= this . _nextPacketSize ) {
517
517
switch ( this . _state ) {
518
518
case 'Auth' :
519
519
this . _handleAuth ( )
@@ -528,11 +528,11 @@ export class Peer extends EventEmitter {
528
528
this . _handleBody ( )
529
529
break
530
530
}
531
- } catch ( err ) {
532
- this . disconnect ( DISCONNECT_REASONS . SUBPROTOCOL_ERROR )
533
- debug ( `Error on peer socket data handling: ${ err } ` )
534
- this . emit ( 'error' , err )
535
531
}
532
+ } catch ( err ) {
533
+ this . disconnect ( DISCONNECT_REASONS . SUBPROTOCOL_ERROR )
534
+ debug ( `Error on peer socket data handling: ${ err } ` )
535
+ this . emit ( 'error' , err )
536
536
}
537
537
}
538
538
You can’t perform that action at this time.
0 commit comments