rewrite error lib

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

No files matched your search

+1 -1
View File
@@ -1,10 +1,10 @@
package protocol
import (
"errors"
"fmt"
"io"
"v2ray.com/core/common/alloc"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/proxy"
+1 -2
View File
@@ -1,9 +1,8 @@
package protocol
import (
"errors"
"io"
"v2ray.com/core/common/errors"
v2net "v2ray.com/core/common/net"
)
+1 -1
View File
@@ -1,9 +1,9 @@
package protocol
import (
"errors"
"fmt"
"v2ray.com/core/common/alloc"
"v2ray.com/core/common/errors"
v2net "v2ray.com/core/common/net"
)
+3 -3
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