[tor-commits] [torsocks/master] log: Avoid crash or file corruption when closing logs