优化全局数据存储方式,以节点 id 为 key 保存相关数据;修复节点下线监听未关闭问题
This commit is contained in:
@@ -36,8 +36,8 @@ func Protect(conn net.Conn, proto Protocol, username, password *string) (*core.A
|
||||
}
|
||||
|
||||
// 查找权限配置
|
||||
var permit, ok = app.Permits.Load(uint16(localPort))
|
||||
if !ok {
|
||||
var permit = app.LoadPermit(uint16(localPort))
|
||||
if permit == nil {
|
||||
return nil, errors.New("没有权限")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user