fix:修改TCP连接逻辑
1. 修改TCP连接逻辑 2. 新增查询最新数据的接口
This commit is contained in:
parent
36766ead45
commit
a673267fd3
@ -66,8 +66,8 @@ func removeConnection(addr string) {
|
||||
logger.Logger.Printf("移除连接: %s, 当前连接数: %d", addr, len(activeConnections.conns))
|
||||
}
|
||||
|
||||
// 获取活跃连接数量
|
||||
func getActiveConnectionCount() int {
|
||||
// GetActiveConnectionCount 获取活跃连接数量
|
||||
func GetActiveConnectionCount() int {
|
||||
activeConnections.mu.RLock()
|
||||
defer activeConnections.mu.RUnlock()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user