diff --git a/transport/internet/websocket/dialer.go b/transport/internet/websocket/dialer.go index 61f803e94..4901ab9cf 100644 --- a/transport/internet/websocket/dialer.go +++ b/transport/internet/websocket/dialer.go @@ -82,7 +82,7 @@ func wsDial(ctx context.Context, dest v2net.Destination) (net.Conn, error) { if resp != nil { reason = resp.Status } - return nil, errors.Base(err).Format("WebSocket|Dialer: Failed to dial to (", uri, "): ", reason) + return nil, errors.Base(err).Message("WebSocket|Dialer: Failed to dial to (", uri, "): ", reason) } return &wsconn{ diff --git a/transport/internet/websocket/hub.go b/transport/internet/websocket/hub.go index d5b8b5f06..eb6cf2336 100644 --- a/transport/internet/websocket/hub.go +++ b/transport/internet/websocket/hub.go @@ -74,8 +74,7 @@ func ListenWS(address v2net.Address, port v2net.Port, options internet.ListenOpt if options.Stream != nil && options.Stream.HasSecuritySettings() { securitySettings, err := options.Stream.GetEffectiveSecuritySettings() if err != nil { - log.Error("WebSocket: Failed to create apply TLS config: ", err) - return nil, err + return nil, errors.Base(err).Message("WebSocket: Failed to create apply TLS config.") } tlsConfig, ok := securitySettings.(*v2tls.Config) if ok { @@ -108,7 +107,7 @@ func (ln *Listener) listenws(address v2net.Address, port v2net.Port) error { go func() { http.Serve(listener, &requestHandler{ - path: "/" + ln.config.GetNormailzedPath(), + path: ln.config.GetNormailzedPath(), conns: ln.awaitingConns, }) }()