mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-07 23:04:17 +08:00
修复DelSessByStoken的panic问题
This commit is contained in:
@@ -417,8 +417,11 @@ func CloseSess(token string) {
|
||||
|
||||
delete(sessions, token)
|
||||
delete(dtlsIds, sess.DtlsSid)
|
||||
|
||||
if sess.CSess != nil {
|
||||
sess.CSess.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func CloseCSess(token string) {
|
||||
sessMux.RLock()
|
||||
@@ -428,8 +431,10 @@ func CloseCSess(token string) {
|
||||
return
|
||||
}
|
||||
|
||||
if sess.CSess != nil {
|
||||
sess.CSess.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func DelSessByStoken(stoken string) {
|
||||
stoken = strings.TrimSpace(stoken)
|
||||
|
Reference in New Issue
Block a user