File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -700,15 +700,15 @@ class Server {
700700 this . connections [ socket . hash ] . buffers [ socket . clientbuffer ] . connected = false ;
701701 }
702702 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 ) {
705706 break ;
707+ }
706708 }
707- let i = 0 ;
708709 if ( i < this . connections [ socket . hash ] . parents . length ) {
709710 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 ) ;
712712 if ( this . connections [ socket . hash ] . parents . length == 0 ) {
713713 this . connections [ socket . hash ] . connected = false ;
714714 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