1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-18 06:54:02 -04:00

rewrite error lib

This commit is contained in:
Darien Raymond
2016-12-04 09:10:47 +01:00
parent a4019a6900
commit efb24a4d21
65 changed files with 251 additions and 132 deletions

View File

@@ -1,13 +1,13 @@
package socks
import (
"errors"
"io"
"sync"
"time"
"v2ray.com/core/app"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/common/errors"
v2io "v2ray.com/core/common/io"
"v2ray.com/core/common/loader"
"v2ray.com/core/common/log"
@@ -112,8 +112,8 @@ func (v *Server) handleConnection(connection internet.Connection) {
defer writer.Release()
auth, auth4, err := protocol.ReadAuthentication(reader)
if err != nil && err != protocol.Socks4Downgrade {
if err != io.EOF {
if err != nil && errors.Cause(err) != protocol.Socks4Downgrade {
if errors.Cause(err) != io.EOF {
log.Warning("Socks: failed to read authentication: ", err)
}
return