icinga-powershell-framework/lib/webserver/Close-IcingaTCPConnection.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

21 lines
437 B
PowerShell

function Close-IcingaTCPConnection()
{
param(
[System.Net.Sockets.TcpClient]$Client = $null
);
if ($null -eq $Client) {
return;
}
Write-IcingaDebugMessage -Message (
[string]::Format(
'Closing client connection for endpoint {0}',
(Get-IcingaTCPClientRemoteEndpoint -Client $Client)
)
);
$Client.Close();
$Client.Dispose();
$Client = $null;
}