From c45f7e8db3da2bb3bbba3e101c43f9fb1ef7eae8 Mon Sep 17 00:00:00 2001 From: robvde Date: Sun, 4 Aug 2013 06:48:29 +0400 Subject: [PATCH] Fixed wsp-10163 WSP 2.1 :: Exchange 2013 :: Connections not properly closed --- .../Exchange2013.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 7a29c014..a12c4e36 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -2014,6 +2014,7 @@ namespace WebsitePanel.Providers.HostedSolution finally { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } } @@ -2342,6 +2343,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxGeneralSettingsInternal"); return info; @@ -2580,6 +2582,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxAdvancedSettingsInternal"); return info; @@ -2647,6 +2650,7 @@ namespace WebsitePanel.Providers.HostedSolution { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal"); } @@ -3092,6 +3096,7 @@ namespace WebsitePanel.Providers.HostedSolution finally { CloseRunspace(runSpace); + CloseRunspaceEx(runSpaceEx); } ExchangeLog.LogEnd("GetMailboxStatisticsInternal"); return info; @@ -5987,7 +5992,7 @@ namespace WebsitePanel.Providers.HostedSolution { try { - if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) + if (runspace != null) { runspace.Dispose(); runspace = null;