We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
多线程创建连接
Bootstrap是单例,AbstractConnectionFactory调用doCreateConnection创建连接,设置connectTimeout参数,不会出现线程问题吗?
The text was updated successfully, but these errors were encountered:
@chuailiwu would you please help to take a look?
Sorry, something went wrong.
Your question 多线程创建连接 Your scenes Bootstrap是单例,AbstractConnectionFactory调用doCreateConnection创建连接,设置connectTimeout参数,不会出现线程问题吗?
好问题,调试确认了一下,结论如下: 确实可能会有你说的多个线程并发设置时,这个超时时间可能会混的问题。options为Bootstrap的属性,创建channel 时会公用这个options。 解法:需要在外面加一个锁来解决。
No branches or pull requests
Your question
多线程创建连接
Your scenes
Bootstrap是单例,AbstractConnectionFactory调用doCreateConnection创建连接,设置connectTimeout参数,不会出现线程问题吗?
The text was updated successfully, but these errors were encountered: