1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-04 09:17:32 -05:00

Increase reading timeout in favor of long connection

This commit is contained in:
V2Ray 2015-10-07 15:24:34 +02:00
parent d2e69ed6f8
commit 3ba9ee73b9
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) {
func (server *SocksServer) HandleConnection(connection net.Conn) error { func (server *SocksServer) HandleConnection(connection net.Conn) error {
defer connection.Close() defer connection.Close()
reader := v2net.NewTimeOutReader(4, connection) reader := v2net.NewTimeOutReader(120, connection)
auth, auth4, err := protocol.ReadAuthentication(reader) auth, auth4, err := protocol.ReadAuthentication(reader)
if err != nil && !errors.HasCode(err, 1000) { if err != nil && !errors.HasCode(err, 1000) {

View File

@ -68,7 +68,7 @@ func (handler *VMessInboundHandler) AcceptConnections(listener net.Listener) err
func (handler *VMessInboundHandler) HandleConnection(connection net.Conn) error { func (handler *VMessInboundHandler) HandleConnection(connection net.Conn) error {
defer connection.Close() defer connection.Close()
connReader := v2net.NewTimeOutReader(4, connection) connReader := v2net.NewTimeOutReader(120, connection)
requestReader := protocol.NewVMessRequestReader(handler.clients) requestReader := protocol.NewVMessRequestReader(handler.clients)
request, err := requestReader.Read(connReader) request, err := requestReader.Read(connReader)