From 5680a88267dad322cd09f3aeda34d01661c6a2d7 Mon Sep 17 00:00:00 2001 From: fatedier Date: Wed, 31 Jul 2019 00:50:38 +0800 Subject: [PATCH] fix connection leak when login_fail_exit is false, fix #1335 --- client/service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/service.go b/client/service.go index 32106ca..007e21d 100644 --- a/client/service.go +++ b/client/service.go @@ -86,6 +86,8 @@ func (svr *Service) Run() error { if g.GlbClientCfg.LoginFailExit { return err } else { + conn.Close() + session.Close() time.Sleep(10 * time.Second) } } else {