1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-28 23:06:14 -04:00

enable conn reuse settings in mkcp

This commit is contained in:
Darien Raymond 2016-11-27 09:02:27 +01:00
parent d19ee4d408
commit b1f78a1ffc
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 5 additions and 2 deletions

View File

@ -439,10 +439,12 @@ func (this *Connection) updateTask() {
} }
func (this *Connection) Reusable() bool { func (this *Connection) Reusable() bool {
return false return this.Config.ConnectionReuse.IsEnabled() && this.reusable
} }
func (this *Connection) SetReusable(b bool) {} func (this *Connection) SetReusable(b bool) {
this.reusable = b
}
func (this *Connection) Terminate() { func (this *Connection) Terminate() {
if this == nil { if this == nil {

View File

@ -100,6 +100,7 @@ func NewListener(address v2net.Address, port v2net.Port, options internet.Listen
return nil, err return nil, err
} }
kcpSettings := networkSettings.(*Config) kcpSettings := networkSettings.(*Config)
kcpSettings.ConnectionReuse = &ConnectionReuse{Enable: false}
auth, err := kcpSettings.GetAuthenticator() auth, err := kcpSettings.GetAuthenticator()
if err != nil { if err != nil {