File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -708,7 +708,7 @@ class Connection extends EventEmitter {
708708 const quitCmd = new Quit ( cmdParam , ended , ended ) ;
709709 this . sendQueue . push ( quitCmd ) ;
710710 this . receiveQueue . push ( quitCmd ) ;
711-
711+
712712 // Deno compatibility: send QUIT immediately to avoid socket resource cleanup issues
713713 const isDeno = typeof Deno !== 'undefined' ;
714714 if ( this . sendQueue . length === 1 ) {
@@ -843,7 +843,11 @@ class Connection extends EventEmitter {
843843 */
844844 debug ( val ) {
845845 if ( typeof val === 'boolean' ) {
846- if ( val && ! this . opts . logger . network ) this . opts . logger . network = console . log ;
846+ if ( val ) {
847+ if ( ! this . opts . logger . network ) this . opts . logger . network = console . log ;
848+ } else {
849+ this . opts . logger . network = null ;
850+ }
847851 } else if ( typeof val === 'function' ) {
848852 this . opts . logger . network = val ;
849853 }
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ describe.sequential('debug', () => {
100100 const serverVersion = conn . serverVersion ( ) ;
101101 if ( isMaxscale ( shareConn ) ) compress = false ;
102102 const rangeWithEOF = compress ? [ 1500 , 2000 ] : [ 1800 , 4250 ] ;
103- const rangeWithoutEOF = compress ? [ 1500 , 2000 ] : [ 2350 , 3250 ] ;
103+ const rangeWithoutEOF = compress ? [ 1500 , 3000 ] : [ 2350 , 3250 ] ;
104104 const data = fs . readFileSync ( path . join ( os . tmpdir ( ) , 'combined' + fileIncrement + '.txt' ) , 'utf8' ) ;
105105 console . log ( data ) ;
106106 assert . isTrue ( data . includes ( 'QUERY: SELECT 3' ) ) ;
You can’t perform that action at this time.
0 commit comments