mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
Remove keepalive settings
This commit is contained in:
parent
51c2a2b880
commit
fc14b9346c
@ -7,7 +7,6 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core"
|
"github.com/v2ray/v2ray-core"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"github.com/v2ray/v2ray-core/common/log"
|
||||||
@ -57,10 +56,6 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error on accepting socks connection: %v", err)
|
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)
|
go server.HandleConnection(connection)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,6 @@ func (handler *VMessInboundHandler) AcceptConnections(listener net.Listener) err
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return log.Error("Failed to accpet connection: %s", err.Error())
|
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)
|
go handler.HandleConnection(connection)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user