feat!: remove TCP socket support for server connections (#2527)
Windows has supported Unix domain sockets for quite some time now, so falling back to TCP sockets can be removed. As a result, Unix domain sockets will be used on all platforms.
This commit is contained in:
1 parent
66bc58b4bf
commit
867cd99f50
5 files changed
+13
-33
No files matched your search
@@ -120,12 +120,12 @@ func readExpr() <-chan expr {
|
||||
go func() {
|
||||
duration := 100 * time.Millisecond
|
||||
|
||||
c, err := net.Dial(gSocketProt, gSocketPath)
|
||||
c, err := net.Dial("unix", gSocketPath)
|
||||
for err != nil {
|
||||
log.Printf("connecting server: %s", err)
|
||||
time.Sleep(duration)
|
||||
duration *= 2
|
||||
c, err = net.Dial(gSocketProt, gSocketPath)
|
||||
c, err = net.Dial("unix", gSocketPath)
|
||||
}
|
||||
|
||||
if _, err := fmt.Fprintf(c, "conn %d\n", gClientID); err != nil {
|
||||
@@ -169,7 +169,7 @@ func readExpr() <-chan expr {
|
||||
}
|
||||
|
||||
func remote(req string) (string, error) {
|
||||
c, err := net.Dial(gSocketProt, gSocketPath)
|
||||
c, err := net.Dial("unix", gSocketPath)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("connecting to server: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user