From 29e9473026877490fa90a4b9d5e01ec37ca134f0 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 13 Jun 2016 12:56:37 +0800 Subject: [PATCH] KCP: delay conn close to prevent conn leak+ --- transport/hub/kcp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/hub/kcp.go b/transport/hub/kcp.go index db712086..63c67001 100644 --- a/transport/hub/kcp.go +++ b/transport/hub/kcp.go @@ -74,7 +74,7 @@ type KCPVconn struct { conntokeep time.Time } -var counter int +//var counter int func (kcpvc *KCPVconn) Read(b []byte) (int, error) { ifb := time.Now().Add(time.Duration(kcpvc.conf.AdvancedConfigs.ReadTimeout) * time.Second)