@@ -2508,7 +2508,6 @@ namespace ts.server {
25082508
25092509 let request : protocol . Request | undefined ;
25102510 let relevantFile : protocol . FileRequestArgs | undefined ;
2511- let commandSucceeded = false ;
25122511 try {
25132512 request = < protocol . Request > JSON . parse ( message ) ;
25142513 relevantFile = request . arguments && ( request as protocol . FileRequest ) . arguments . file ? ( request as protocol . FileRequest ) . arguments : undefined ;
@@ -2527,8 +2526,6 @@ namespace ts.server {
25272526 }
25282527
25292528 // Note: Log before writing the response, else the editor can complete its activity before the server does
2530- // Set 'commandSucceded' flag to ensure logStopCommand doesn't get called twice (e.g. if doOutput throws)
2531- commandSucceeded = true ;
25322529 perfLogger . logStopCommand ( "" + request . command , "Success" ) ;
25332530 if ( response ) {
25342531 this . doOutput ( response , request . command , request . seq , /*success*/ true ) ;
@@ -2540,13 +2537,13 @@ namespace ts.server {
25402537 catch ( err ) {
25412538 if ( err instanceof OperationCanceledException ) {
25422539 // Handle cancellation exceptions
2543- if ( ! commandSucceeded ) perfLogger . logStopCommand ( "" + ( request && request . command ) , "Canceled: " + err ) ;
2540+ perfLogger . logStopCommand ( "" + ( request && request . command ) , "Canceled: " + err ) ;
25442541 this . doOutput ( { canceled : true } , request ! . command , request ! . seq , /*success*/ true ) ;
25452542 return ;
25462543 }
25472544
25482545 this . logErrorWorker ( err , message , relevantFile ) ;
2549- if ( ! commandSucceeded ) perfLogger . logStopCommand ( "" + ( request && request . command ) , "Error: " + err ) ;
2546+ perfLogger . logStopCommand ( "" + ( request && request . command ) , "Error: " + err ) ;
25502547
25512548 this . doOutput (
25522549 /*info*/ undefined ,
0 commit comments