Skip to content

Commit 610bc3b

Browse files
Reymerclaude
andcommitted
[修正] EDGELINK_STATUS 改用 IP 位址取代臨時 port
臨時 port 每次重連都會改變,導致無法穩定識別設備。 改為只傳 IP 位址,確保重連後識別碼不變。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3618d9e commit 610bc3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Server/NetworkServer/TCP/TCPServerConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ private void NotifyForwardTargetStatusChange(string status, PortData sourcePortD
342342
private async Task NotifyAsync(string status, PortData sourcePortData, IPEndPoint? endpoint = null)
343343
{
344344
string edgeStatus = status == "CONNECT" ? "CONNECTED" : "DISCONNECTED";
345-
string endpointStr = endpoint?.ToString() ?? "";
345+
string endpointStr = endpoint?.Address?.ToString() ?? "";
346346
string notifyMessage = $"EDGELINK_STATUS:{edgeStatus}:{sourcePortData.ProtocolName}@{endpointStr}";
347347
byte[] notifyBytes = Encoding.UTF8.GetBytes(notifyMessage + "\n");
348348

0 commit comments

Comments
 (0)