alanmcgovern / monotorrent

The official repository for MonoTorrent, a bittorrent library for .NET

Home Page:https://github.com/alanmcgovern/monotorrent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File handles are not closed after stopping a torrent, and in some cases StopAsync can deadlock

ManlyMarco opened this issue · comments

Using StopAsync on a torrent doesn't seem to release its file handles (at least in some cases), even though they are no longer necessary. The issue seems to get worse if MoveFileAsync is ever used, and might even result in StopAsync getting stuck and never finishing.

Possibly related to #598
Tested on 3.0.0-beta.rev0106.

After some more testing, it looks like this issue doesn't happen if I let the torrent run to completion and never use MoveFileAsync.

Out of curiosity, is this issue still a problem now that #598 is resolved? If not, are you still seeing file handles remaining active after the torrent has completed? I assume this manifests with other applications being unable to open/close/delete the files monotorrent still has open?

It appears to have been resolved as well, yes. I'll close this issue in this case.