starlight
starlight copied to clipboard
SingleChannle中getChannel是否会泄露连接?
请问BrpcSingleChannel中
public Channel getChannel() throws Exception, NoSuchElementException, IllegalStateException {
if (isNonActive(channel)) {
synchronized (this) {
if (isNonActive(channel)) {
channel = createChannel(serviceInstance.getIp(), serviceInstance.getPort());
}
}
}
return channel;
}
没看到有旧channel关闭的代码,是否会泄露?谢谢