mirror of
https://github.com/etaHEN/etaHEN.git
synced 2026-01-12 19:25:33 +08:00
Formatting fix
This commit is contained in:
@@ -60,10 +60,10 @@ try {
|
|||||||
$tcpClient.Close() # Ensure the client is closed
|
$tcpClient.Close() # Ensure the client is closed
|
||||||
exit # Exit the script if connection fails
|
exit # Exit the script if connection fails
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$tcpClient.EndConnect($connectResult) # Complete the connection
|
# Complete the connection
|
||||||
}
|
$tcpClient.EndConnect($connectResult)
|
||||||
|
|
||||||
# Get the network stream
|
# Get the network stream
|
||||||
$stream = $tcpClient.GetStream()
|
$stream = $tcpClient.GetStream()
|
||||||
|
|
||||||
@@ -88,7 +88,6 @@ try {
|
|||||||
catch {
|
catch {
|
||||||
Write-Error "An error occurred: $($_.Exception.Message), press any key to exit"
|
Write-Error "An error occurred: $($_.Exception.Message), press any key to exit"
|
||||||
Write-Error $_.Exception.StackTrace
|
Write-Error $_.Exception.StackTrace
|
||||||
[System.Console]::ReadKey() | Out-Null
|
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
# Ensure resources are cleaned up even if an error occurs
|
# Ensure resources are cleaned up even if an error occurs
|
||||||
|
|||||||
Reference in New Issue
Block a user