File tree Expand file tree Collapse file tree
src/System.Management.Automation/engine/remoting/fanin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,15 +473,13 @@ internal void CloseShellOperation(
473473 return ;
474474 }
475475
476- SetThreadProperties ( mgdShellSession . creationRequestDetails ) ;
477476 // update the internal data store only if this is not receive operation.
478477 if ( ! context . isReceiveOperation )
479478 {
480479 DeleteFromActiveShellSessions ( context . shellContext ) ;
481480 }
482481
483- string errorMsg = StringUtil . Format ( RemotingErrorIdStrings . WSManPluginOperationClose ) ;
484- System . Exception reasonForClose = new System . Exception ( errorMsg ) ;
482+ System . Exception reasonForClose = new System . Exception ( RemotingErrorIdStrings . WSManPluginOperationClose ) ;
485483 mgdShellSession . CloseOperation ( context , reasonForClose ) ;
486484 }
487485
@@ -502,7 +500,7 @@ internal void CloseCommandOperation(
502500 //Dbg.Assert(false, "context.shellContext not matched");
503501 return ;
504502 }
505- SetThreadProperties ( mgdShellSession . creationRequestDetails ) ;
503+
506504 mgdShellSession . CloseCommandOperation ( context ) ;
507505 }
508506
Original file line number Diff line number Diff line change @@ -698,6 +698,8 @@ internal override void CloseOperation(
698698 }
699699 }
700700
701+ WSManPluginInstance . SetThreadProperties ( creationRequestDetails ) ;
702+
701703 bool isRcvOpShuttingDown = ( context . isShuttingDown ) & & ( context . isReceiveOperation ) ;
702704 bool isRcvOp = context . isReceiveOperation ;
703705 bool isShuttingDown = context . isShuttingDown ;
@@ -797,6 +799,8 @@ internal override void CloseOperation(
797799 }
798800 }
799801
802+ WSManPluginInstance . SetThreadProperties ( creationRequestDetails ) ;
803+
800804 bool isRcvOp = context . isReceiveOperation ;
801805 // only one thread will be here.
802806 bool isRcvOpShuttingDown = ( context . isShuttingDown ) & &
You can’t perform that action at this time.
0 commit comments