1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

server: fix unix socket path

For #1415
This commit is contained in:
wdvxdr 2022-03-23 21:25:31 +08:00
parent 40a765b117
commit d161f35c69
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6

View File

@ -221,7 +221,8 @@ func resolveURI(addr string) (network, address string) {
network = ext network = ext
uri.Scheme = scheme // remove `+unix`/`+tcp4` uri.Scheme = scheme // remove `+unix`/`+tcp4`
if ext == "unix" { if ext == "unix" {
uri.Host = base64.StdEncoding.EncodeToString([]byte(uri.Host + uri.Path)) uri.Host, uri.Path, _ = strings.Cut(uri.Path, ":")
uri.Host = base64.StdEncoding.EncodeToString([]byte(uri.Host))
} }
address = uri.String() address = uri.String()
} }