open-im-server
open-im-server copied to clipboard
连接池写了又没用上 为什么idleTimeout+ timeUsed >当前时间 ClientConn要关掉重建 直接把新建的grpc连接塞里面不就行了
这块: If the wrapper was idle too long, close the connection and create a new one. // If the wrapper was idle too long, close the connection and create a new // one. It's safe to assume that there isn't any newer client as the client // we fetched is the first in the channel idleTimeout := p.idleTimeout if wrapper.ClientConn != nil && idleTimeout > 0 && wrapper.timeUsed.Add(idleTimeout).Before(time.Now()) {
wrapper.ClientConn.Close()
wrapper.ClientConn = nil
}