summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapter/socketclient/socketclient.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/adapter/socketclient/socketclient.go b/adapter/socketclient/socketclient.go
index 8efc7ba..2b67645 100644
--- a/adapter/socketclient/socketclient.go
+++ b/adapter/socketclient/socketclient.go
@@ -171,10 +171,15 @@ func (c *vppClient) connect(sockAddr string) error {
return err
}
- conn, err := net.DialUnix("unixpacket", nil, addr)
+ conn, err := net.DialUnix("unix", nil, addr)
if err != nil {
- Log.Debugln("Dial error:", err)
- return err
+ if strings.Contains(err.Error(), "wrong type for socket") {
+ conn, err = net.DialUnix("unixpacket", nil, addr)
+ }
+ if err != nil {
+ Log.Debugln("Dial error:", err)
+ return err
+ }
}
c.conn = conn