1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 01:40:44 +00:00
This commit is contained in:
Darien Raymond 2017-02-10 11:57:59 +01:00
parent 1aeab3dd96
commit cfcf16feed
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 3 additions and 4 deletions

View File

@ -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{

View File

@ -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,
})
}()