mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
19 lines
340 B
PowerShell
19 lines
340 B
PowerShell
function Close-IcingaTCPSocket()
|
|
{
|
|
param(
|
|
[System.Net.Sockets.TcpListener]$Socket = $null
|
|
);
|
|
|
|
if ($null -eq $Socket) {
|
|
return;
|
|
}
|
|
|
|
Write-IcingaDebugMessage -Message (
|
|
[string]::Format(
|
|
'Closing TCP socket {0}',
|
|
$Socket.LocalEndpoint
|
|
)
|
|
);
|
|
|
|
$Socket.Stop();
|
|
}
|