1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 14:26:11 -04:00

fix crash

This commit is contained in:
Shelikhoo 2016-08-14 20:41:26 +08:00
parent 5e576e11bb
commit fed2933043
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21

View File

@ -113,8 +113,10 @@ func wsDial(src v2net.Address, dest v2net.Destination) (*wsconn, error) {
conn, resp, err := dialer.Dial(uri, nil)
if err != nil {
reason, reasonerr := ioutil.ReadAll(resp.Body)
log.Info(string(reason), reasonerr)
if resp != nil {
reason, reasonerr := ioutil.ReadAll(resp.Body)
log.Info(string(reason), reasonerr)
}
return nil, err
}
return func() internet.Connection {