Skip to content

Commit fb4e470

Browse files
committed
attempt to make error handling work on Windows
1 parent c0cba16 commit fb4e470

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

agent/immortalstreams/manager.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"net"
9+
"strings"
910
"sync"
1011
"syscall"
1112
"time"
@@ -245,5 +246,10 @@ func isConnectionRefused(err error) bool {
245246
}
246247
}
247248

248-
return false
249+
// Cross-platform fallback: check error message for common connection refused patterns
250+
// This handles Windows (connectex) and other platforms that might have different error constants
251+
errStr := err.Error()
252+
return strings.Contains(errStr, "connection refused") ||
253+
strings.Contains(errStr, "connectex: No connection could be made because the target machine actively refused it") ||
254+
strings.Contains(errStr, "actively refused")
249255
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy