From 8ed15ce847852db7216a37d075d78ba41b61c42a Mon Sep 17 00:00:00 2001 From: V2Ray Date: Thu, 17 Sep 2015 22:05:47 +0200 Subject: [PATCH] remove bufio --- net/socks/socks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/socks/socks.go b/net/socks/socks.go index 46cc2f802..c3474dda8 100644 --- a/net/socks/socks.go +++ b/net/socks/socks.go @@ -1,7 +1,7 @@ package socks import ( - "bufio" + _ "bufio" "errors" "io" "net" @@ -62,7 +62,7 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) { func (server *SocksServer) HandleConnection(connection net.Conn) error { defer connection.Close() - reader := bufio.NewReader(connection) + reader := connection.(io.Reader) auth, auth4, err := socksio.ReadAuthentication(reader) if err != nil && err != socksio.ErrorSocksVersion4 {