Potential thread leak in TorCtl
TorCtl seems to leak threads, more exactly TorCtl.Connection leaks the _loop thread.
Here is simple python code to reproduce the leak:
#!/usr/bin/python
import socket import time from TorCtl import TorCtl
def doCheck(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("localhost", 9051)) control = TorCtl.Connection(sock) control.authenticate("") control.get_info(str("ns/id/6AF64BD1DF8B92D5194760C2256EBF80F70273DD")) control.close() del control del sock
def main(): while True: doCheck() time.sleep(1)
if name == "main": main()
Simply run this program and check the number of runnung threads via ps -eLf
.
[Automatically added by flyspray2trac: Operating System: All]