Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ChannelPoolObjectFactory.wrap方法的实现问题 #49

Open
bgmall opened this issue Sep 5, 2017 · 1 comment
Open

ChannelPoolObjectFactory.wrap方法的实现问题 #49

bgmall opened this issue Sep 5, 2017 · 1 comment
Assignees
Labels

Comments

@bgmall
Copy link

bgmall commented Sep 5, 2017

ChannelPoolObjectFactory的wrap方法应该是有问题,这里节选了一部分代码如下:

public PooledObject wrap(Connection obj) {
Connection connection = fetchConnection();

    // 中间代码省略....

    return new DefaultPooledObject<Connection>(connection);
}

wrap输入参数obj应该是已经调用ChannelPoolObjectFactory.create方法,在create方法里面已经调用fetchConnection, 为什么wrap里面还要再次fetchConnection,导致两次创建Connection.

@jhunters
Copy link
Collaborator

jhunters commented Sep 5, 2017

的确,存在重复创建Connection对象问题,会在下一个版本修复

@jhunters jhunters added the bug label Sep 5, 2017
@jhunters jhunters self-assigned this Sep 5, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants