mirror of https://github.com/bjdgyc/anylink.git
修复DelSessByStoken的panic问题
This commit is contained in:
parent
87dcc63b6f
commit
50c30657ac
|
@ -417,7 +417,10 @@ func CloseSess(token string) {
|
|||
|
||||
delete(sessions, token)
|
||||
delete(dtlsIds, sess.DtlsSid)
|
||||
sess.CSess.Close()
|
||||
|
||||
if sess.CSess != nil {
|
||||
sess.CSess.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func CloseCSess(token string) {
|
||||
|
@ -428,7 +431,9 @@ func CloseCSess(token string) {
|
|||
return
|
||||
}
|
||||
|
||||
sess.CSess.Close()
|
||||
if sess.CSess != nil {
|
||||
sess.CSess.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func DelSessByStoken(stoken string) {
|
||||
|
|
Loading…
Reference in New Issue