Fixed wsp-10163 WSP 2.1 :: Exchange 2013 :: Connections not properly closed

This commit is contained in:
robvde 2013-08-04 06:48:29 +04:00
parent 6cb0a713ce
commit c45f7e8db3

View file

@ -2014,6 +2014,7 @@ namespace WebsitePanel.Providers.HostedSolution
finally finally
{ {
CloseRunspace(runSpace); CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
} }
} }
@ -2342,6 +2343,7 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
CloseRunspace(runSpace); CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
} }
ExchangeLog.LogEnd("GetMailboxGeneralSettingsInternal"); ExchangeLog.LogEnd("GetMailboxGeneralSettingsInternal");
return info; return info;
@ -2580,6 +2582,7 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
CloseRunspace(runSpace); CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
} }
ExchangeLog.LogEnd("GetMailboxAdvancedSettingsInternal"); ExchangeLog.LogEnd("GetMailboxAdvancedSettingsInternal");
return info; return info;
@ -2647,6 +2650,7 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
CloseRunspace(runSpace); CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
} }
ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal"); ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal");
} }
@ -3092,6 +3096,7 @@ namespace WebsitePanel.Providers.HostedSolution
finally finally
{ {
CloseRunspace(runSpace); CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
} }
ExchangeLog.LogEnd("GetMailboxStatisticsInternal"); ExchangeLog.LogEnd("GetMailboxStatisticsInternal");
return info; return info;
@ -5987,7 +5992,7 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
try try
{ {
if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) if (runspace != null)
{ {
runspace.Dispose(); runspace.Dispose();
runspace = null; runspace = null;