Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Feb 13, 2025
1 parent 724a118 commit 45a3900
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions assists/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ function Set-FountAssist(
) {
if ($AssistCharname) { $Global:FountAssist.AssistCharname = $AssistCharname }
if ($FountUsername) { $Global:FountAssist.FountUsername = $FountUsername }
if (-not (Test-FountRunning)) {
Start-Fount background keepalive runshell $Global:FountAssist.FountUsername preload chars $Global:FountAssist.AssistCharname
}
Start-Fount background keepalive runshell $Global:FountAssist.FountUsername preload chars $Global:FountAssist.AssistCharname
if ($script:FountAssistInstalled) { return }
if ($EshellUI) { . $PSScriptRoot/esh-assist.ps1 }
else { . $PSScriptRoot/pwsh-assist.ps1 }
Expand Down
10 changes: 5 additions & 5 deletions base.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function Set-FountClient($ComputerName = "localhost", $Port = 16698) {
}
}

Write-Verbose "正在尝试连接到 Fount 服务器..."
# 创建新的 TCP 客户端
$Client = New-Object System.Net.Sockets.TcpClient
if ($Client.ConnectAsync($ComputerName, $Port).Wait(100)) {
try{
# 创建新的 TCP 客户端
$Client = New-Object System.Net.Sockets.TcpClient
$Client.Connect($ComputerName, $Port)
Write-Verbose "成功连接到 Fount 服务器。"
$script:FountClient = $Client
}
else {
catch {
Write-Error "无法连接到 Fount 服务器" -ErrorAction Stop
}
}
Expand Down
2 changes: 1 addition & 1 deletion fount-pwsh.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'fount-pwsh.psm1'

# Version number of this module.
ModuleVersion = '0.0.2'
ModuleVersion = '0.0.3'

# ID used to uniquely identify this module
GUID = '2a16dae2-91d8-4743-952c-94acd1ed7e5a'
Expand Down

0 comments on commit 45a3900

Please sign in to comment.