Open xzc-coder opened 1 year ago
Looks like not considered concurrency,can you fix it?
has fixed by https://github.com/sofastack/sofa-bolt/pull/321
PR https://github.com/sofastack/sofa-bolt/pull/321 's unit test can not reproduce the bug. So i wonder there may be other bugs in this situation.
Describe the bug 当多线程环境下添加EventProcessor时,会报数组越界异常
Expected behavior
当多线程环境下调用com.alipay.remoting.rpc.RpcClient#addConnectionEventProcessor 应该正常添加
Actual behavior
当多线程环境下调用com.alipay.remoting.rpc.RpcClient#addConnectionEventProcessor 报数组越界异常
Steps to reproduce
Minimal yet complete reproducer code (or GitHub URL to code)
com.alipay.remoting.ConnectionEventListener#addConnectionEventProcessor
ArrayList不是线程安全的
Environment
java -version
):1.8uname -a
):windows