mirror of https://github.com/v2ray/v2ray-core
dont reuse shadowsock connections
parent
68b85cce60
commit
c5a92e00ef
|
@ -61,6 +61,8 @@ func (this *Client) Dispatch(destination v2net.Destination, payload *alloc.Buffe
|
||||||
}
|
}
|
||||||
log.Info("Shadowsocks|Client: Tunneling request to ", destination, " via ", server.Destination())
|
log.Info("Shadowsocks|Client: Tunneling request to ", destination, " via ", server.Destination())
|
||||||
|
|
||||||
|
conn.SetReusable(false)
|
||||||
|
|
||||||
request := &protocol.RequestHeader{
|
request := &protocol.RequestHeader{
|
||||||
Version: Version,
|
Version: Version,
|
||||||
Address: destination.Address,
|
Address: destination.Address,
|
||||||
|
|
|
@ -146,6 +146,7 @@ func (this *Server) handlerUDPPayload(payload *alloc.Buffer, session *proxy.Sess
|
||||||
|
|
||||||
func (this *Server) handleConnection(conn internet.Connection) {
|
func (this *Server) handleConnection(conn internet.Connection) {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
conn.SetReusable(false)
|
||||||
|
|
||||||
timedReader := v2net.NewTimeOutReader(16, conn)
|
timedReader := v2net.NewTimeOutReader(16, conn)
|
||||||
defer timedReader.Release()
|
defer timedReader.Release()
|
||||||
|
|
Loading…
Reference in New Issue