1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-25 00:45:24 +00:00

Remove keepalive settings

This commit is contained in:
V2Ray 2015-09-24 15:10:02 +02:00
parent 51c2a2b880
commit fc14b9346c
2 changed files with 0 additions and 9 deletions

View File

@ -7,7 +7,6 @@ import (
"net"
"strconv"
"sync"
"time"
"github.com/v2ray/v2ray-core"
"github.com/v2ray/v2ray-core/common/log"
@ -57,10 +56,6 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) {
if err != nil {
log.Error("Error on accepting socks connection: %v", err)
}
if tcpConn, ok := connection.(*net.TCPConn); ok {
tcpConn.SetKeepAlive(true)
tcpConn.SetKeepAlivePeriod(4 * time.Second)
}
go server.HandleConnection(connection)
}
}

View File

@ -54,10 +54,6 @@ func (handler *VMessInboundHandler) AcceptConnections(listener net.Listener) err
if err != nil {
return log.Error("Failed to accpet connection: %s", err.Error())
}
if tcpConn, ok := connection.(*net.TCPConn); ok {
tcpConn.SetKeepAlive(true)
tcpConn.SetKeepAlivePeriod(4 * time.Second)
}
go handler.HandleConnection(connection)
}
return nil