mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
Increase reading timeout in favor of long connection
This commit is contained in:
parent
d2e69ed6f8
commit
3ba9ee73b9
@ -57,7 +57,7 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) {
|
||||
func (server *SocksServer) HandleConnection(connection net.Conn) error {
|
||||
defer connection.Close()
|
||||
|
||||
reader := v2net.NewTimeOutReader(4, connection)
|
||||
reader := v2net.NewTimeOutReader(120, connection)
|
||||
|
||||
auth, auth4, err := protocol.ReadAuthentication(reader)
|
||||
if err != nil && !errors.HasCode(err, 1000) {
|
||||
|
@ -68,7 +68,7 @@ func (handler *VMessInboundHandler) AcceptConnections(listener net.Listener) err
|
||||
func (handler *VMessInboundHandler) HandleConnection(connection net.Conn) error {
|
||||
defer connection.Close()
|
||||
|
||||
connReader := v2net.NewTimeOutReader(4, connection)
|
||||
connReader := v2net.NewTimeOutReader(120, connection)
|
||||
requestReader := protocol.NewVMessRequestReader(handler.clients)
|
||||
|
||||
request, err := requestReader.Read(connReader)
|
||||
|
Loading…
Reference in New Issue
Block a user