ssh: reuse underlying connection (#251)

This commit is contained in:
nadoo committed 2021-04-20 15:28:52 +08:00
1 parent 2a7eed7667
commit ddfcaae49c
15 files changed
+46 -24

No files matched your search

+4
View File
@@ -53,6 +53,10 @@ func DialerFromURL(s string, dialer Dialer) (Dialer, error) {
return nil, errors.New("DialerFromURL: dialer cannot be nil")
}
if !strings.Contains(s, "://") {
s = s + "://"
}
scheme := s[:strings.Index(s, ":")]
c, ok := dialerCreators[strings.ToLower(scheme)]
if ok {