I use the inMemoryLdapServer for some unit tests and call shutdown on them when done. In 4.0.7, it was fine but upgrading to 4.0.11 detects a thread leak of "Write Timeout Handler Timer". What is the best way to it down? Thanks @dirmgr
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the result of a change introduced in the 4.0.11 release. In earlier releases, there was an issue in which if an attempt to write to the server was blocked, it could wait indefinitely. It uses a Java timer to accomplish this, and a single timer instance is shared across all connections. Even after all connections have been closed, the timer instance remains active so that it can be reused by any subsequent connections that get established.
I have just committed a change that redesigns the timer mechanism so that it's shut down when all connections have been closed. As long as at least one connection is established, a timer will be active, and any new connections created while there is an active timer will reuse that timer. However, once all connections have been closed, then the timer will be shut down. Upon creating a new connection after that, it will create a new timer instance that is eligible to be shared among any further connections.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Awesome, We were worried about just this scenario (ran into similar issues with other interactions with external services). We pick up artifacts via maven. Any ideas when we will have a public release with this fix? Thanks again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't currently have a hard target date for the next release, but it'll probably be at least a couple of months. However, there is no issue with continuing to use the current version, since the issue is completely benign and doesn't actually cause a problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use the inMemoryLdapServer for some unit tests and call shutdown on them when done. In 4.0.7, it was fine but upgrading to 4.0.11 detects a thread leak of "Write Timeout Handler Timer". What is the best way to it down? Thanks @dirmgr
This is the result of a change introduced in the 4.0.11 release. In earlier releases, there was an issue in which if an attempt to write to the server was blocked, it could wait indefinitely. It uses a Java timer to accomplish this, and a single timer instance is shared across all connections. Even after all connections have been closed, the timer instance remains active so that it can be reused by any subsequent connections that get established.
I have just committed a change that redesigns the timer mechanism so that it's shut down when all connections have been closed. As long as at least one connection is established, a timer will be active, and any new connections created while there is an active timer will reuse that timer. However, once all connections have been closed, then the timer will be shut down. Upon creating a new connection after that, it will create a new timer instance that is eligible to be shared among any further connections.
Awesome, We were worried about just this scenario (ran into similar issues with other interactions with external services). We pick up artifacts via maven. Any ideas when we will have a public release with this fix? Thanks again
I don't currently have a hard target date for the next release, but it'll probably be at least a couple of months. However, there is no issue with continuing to use the current version, since the issue is completely benign and doesn't actually cause a problem.