Skip to content

Commit

Permalink
Merge pull request #373 from arixmkii/fix-qemu-socket
Browse files Browse the repository at this point in the history
Fix OS specific url handling for unix:// scheme in transport
  • Loading branch information
openshift-merge-bot[bot] authored Jul 23, 2024
2 parents 3021c37 + ae9b91a commit 2b36bdd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/transport/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ import (
"errors"
"net"
"net/url"
"runtime"
"strings"
)

func defaultListenURL(url *url.URL) (net.Listener, error) {
switch url.Scheme {
case "unix":
return net.Listen(url.Scheme, url.Path)
path := url.Path
if runtime.GOOS == "windows" {
path = strings.TrimPrefix(path, "/")
}
return net.Listen(url.Scheme, path)
case "tcp":
return net.Listen("tcp", url.Host)
default:
Expand Down

0 comments on commit 2b36bdd

Please sign in to comment.