1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00
This commit is contained in:
Darien Raymond 2017-01-08 23:15:29 +01:00
parent c5d66a436c
commit 2e46e95536
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -101,7 +101,7 @@ func (v *Server) handleConnection(connection internet.Connection) {
connection.SetReusable(false)
timedReader := v2net.NewTimeOutReader(v.config.Timeout, connection)
timedReader := v2net.NewTimeOutReader(16 /* seconds, for handshake */, connection)
reader := bufio.NewReader(timedReader)
session := &ServerSession{
@ -128,6 +128,7 @@ func (v *Server) handleConnection(connection internet.Connection) {
log.Info("Socks|Server: TCP Connect request to ", dest)
log.Access(clientAddr, dest, log.AccessAccepted, "")
timedReader.SetTimeOut(v.config.Timeout)
v.transport(reader, connection, session)
return
}