mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +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