Closed haslersn closed 4 years ago
I believe this is a bug in tokio
. Try setting it explicitly to 0.1.11, which is (from my testing) the last version that drops the Core
as expected.
[dependencies]
tokio = "=0.1.11"
I believe this is a bug in
tokio
. Try setting it explicitly to 0.1.11, which is (from my testing) the last version that drops theCore
as expected.[dependencies] tokio = "=0.1.11"
Thanks, that did the trick.
With the port to Tokio 0.2, this can now be closed. I've tested the new version by opening and dropping a connection in a tight loop, which would have exhausted the available file descriptors in under a second if there was a leak. There wasn't.
I have a program that uses this
ldap3
library so as to regularly create an ldap connection. Each time a file descriptor is opened, as can be seen in/proc/<PID>/fd
. Unfortunately, those file descriptors are never closed, even if the corresponding handle to the connection (in the Rust code) is dropped. They are leaked. Therefore, the program eventually runs out of file descriptors and crashes.