File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -700,15 +700,15 @@ class Server {
700
700
this . connections [ socket . hash ] . buffers [ socket . clientbuffer ] . connected = false ;
701
701
}
702
702
if ( this . connections [ socket . hash ] ) {
703
- for ( let i = 0 ; i < this . connections [ socket . hash ] . parents . length ; i ++ ) {
704
- if ( this . connections [ socket . hash ] . parents [ i ] == socket )
703
+ let i ;
704
+ for ( i = 0 ; i < this . connections [ socket . hash ] . parents . length ; i ++ ) {
705
+ if ( this . connections [ socket . hash ] . parents [ i ] == socket ) {
705
706
break ;
707
+ }
706
708
}
707
- let i = 0 ;
708
709
if ( i < this . connections [ socket . hash ] . parents . length ) {
709
710
this . connections [ socket . hash ] . users -- ;
710
- if ( this . connections [ socket . hash ] . users <= 1 )
711
- this . connections [ socket . hash ] . parents . splice ( i , 1 ) ;
711
+ this . connections [ socket . hash ] . parents . splice ( i , 1 ) ;
712
712
if ( this . connections [ socket . hash ] . parents . length == 0 ) {
713
713
this . connections [ socket . hash ] . connected = false ;
714
714
this . connections [ socket . hash ] . write ( `AWAY :away-${ Math . floor ( Date . now ( ) / 1000 ) } \n` ) ;
You can’t perform that action at this time.
0 commit comments