File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,19 @@ export class SQLJob {
104
104
stream . stdout . on ( `data` , ( data : Buffer ) => {
105
105
outString += String ( data ) ;
106
106
if ( outString . endsWith ( `\n` ) ) {
107
- let thisMsg = outString ;
108
- outString = `` ;
109
- if ( this . isTracingChannelData ) ServerComponent . writeOutput ( thisMsg ) ;
110
- try {
111
- let response : ReqRespFmt = JSON . parse ( thisMsg ) ;
112
- this . responseEmitter . emit ( response . id , thisMsg ) ;
113
- } catch ( e : any ) {
114
- console . log ( `Error: ` + e ) ;
107
+ for ( const thisMsg of outString . split ( `\n` ) ) {
108
+ if ( thisMsg === `` ) continue ;
109
+
115
110
outString = `` ;
111
+ if ( this . isTracingChannelData ) ServerComponent . writeOutput ( thisMsg ) ;
112
+ try {
113
+ let response : ReqRespFmt = JSON . parse ( thisMsg ) ;
114
+ this . responseEmitter . emit ( response . id , thisMsg ) ;
115
+ } catch ( e : any ) {
116
+ console . log ( `Error: ` + e ) ;
117
+ console . log ( `Data: ` + thisMsg ) ;
118
+ outString = `` ;
119
+ }
116
120
}
117
121
}
118
122
} ) ;
You can’t perform that action at this time.
0 commit comments