mirror of
https://github.com/fatedier/frp.git
synced 2024-11-24 02:59:19 +08:00
close session in login()
This commit is contained in:
parent
30cb0a3ab0
commit
394af08561
@ -86,8 +86,6 @@ func (svr *Service) Run() error {
|
||||
if g.GlbClientCfg.LoginFailExit {
|
||||
return err
|
||||
} else {
|
||||
conn.Close()
|
||||
session.Close()
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
} else {
|
||||
@ -169,6 +167,9 @@ func (svr *Service) login() (conn frpNet.Conn, session *fmux.Session, err error)
|
||||
defer func() {
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
if session != nil {
|
||||
session.Close()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user