Skip to content

Conversation

@hopehook
Copy link

No description provided.

@hopehook
Copy link
Author

从 Get 方法中把 Connect 拆出来,使得用户可以创建新的连接。
可能的应用场景:
1,Get 之后,发现连接池的连接失效,通过 Connect 重连进行操作,如果多次重试还是失效,说明 server 确实不可用。如果 server 只是短暂重启,Connect 可以支持这种场景,清理失效连接。

2,初始化的时候,连接池的数量设定的过少,希望后期人为增加连接数量。可以 Connect,然后 Put。

channel.go Outdated
}
}

//Conn 重新创建一个连接
Copy link
Owner

@silenceper silenceper Sep 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golint: Connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants