mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge 55c20d2872 into 2eedbe799f
This commit is contained in:
commit
02d767f43c
1 changed files with 8 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
@ -177,6 +178,13 @@ func DialContext(ctx context.Context, rawurl string) (*Client, error) {
|
||||||
case "":
|
case "":
|
||||||
return DialIPC(ctx, rawurl)
|
return DialIPC(ctx, rawurl)
|
||||||
default:
|
default:
|
||||||
|
if runtime.GOOS == "windows" && len(u.Scheme) == 1 {
|
||||||
|
for s := 'a'; s <= 'z'; s++ {
|
||||||
|
if rune(u.Scheme[0]) == s {
|
||||||
|
return DialIPC(ctx, rawurl)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil, fmt.Errorf("no known transport for URL scheme %q", u.Scheme)
|
return nil, fmt.Errorf("no known transport for URL scheme %q", u.Scheme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue