Add tool function to close and flush TCP connections

This commit is contained in:
Lord Hepipud 2019-10-22 20:05:43 +02:00
parent 5276b7a505
commit afec954d35

View file

@ -0,0 +1,14 @@
function Close-IcingaTcpConnection()
{
param(
$TcpClient
);
if ($null -eq $TcpClient) {
return;
}
$TcpClient.Close();
$TcpClient.Dispose();
$TcpClient = $null;
}