|
|
@@ -689,9 +689,15 @@ func (h *Hub) ConnectToServer(channel string, force bool, host *HostInfo) (err e
|
|
|
go func() {
|
|
|
if host.Version == ws2.VERSION && (host.Proto == ws2.PROTO || host.Proto == ws2.PROTO_STL) {
|
|
|
runProto = ws2.PROTO
|
|
|
+ if h.cf.PrintMsg {
|
|
|
+ log.Println("[Connect]", host.Proto, addr, host.Path, host.Hash)
|
|
|
+ }
|
|
|
conn, err = ws2.Dial(h.cf, host.Proto, addr, host.Path, host.Hash)
|
|
|
} else if host.Version == tcp2.VERSION && host.Proto == tcp2.PROTO {
|
|
|
runProto = tcp2.PROTO
|
|
|
+ if h.cf.PrintMsg {
|
|
|
+ log.Println("[Connect]", host.Proto, addr, host.Hash)
|
|
|
+ }
|
|
|
conn, err = tcp2.Dial(h.cf, addr, host.Hash)
|
|
|
} else {
|
|
|
err = fmt.Errorf("not correct protocol and version found in: %+v", host)
|