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

Putting the computer to S3 sleep causes monotorrent to get stuck at 0 connections

ManlyMarco opened this issue · comments

Starting seeding, waiting for some peers to connect, putting windows to S3 sleep (I did it for a couple of hours), then waking the computer up, causes the client to get stuck with 0 connections. It occassionally fails to make a connection and that's all. Restarting the client makes it work again. The torrents were still in DownloadMode.

Update on this, it looks like after leaving it for a fairly long time after waking up, it does sort itself out. So I guess the issue isn't that it gets stuck completely but for a fairly long time.

If you can reproduce this with a debugger attached and see what's going on, that'd be super helpful. Otherwise I'll try to reproduce it. It's one of those things that's probably easy to address if it can be pinpointed. At the core there is a timer in the library which should ensure things pick up ~immediately after waking up from sleep. I'm curious why that's not the case.

When it's stuck, is it using 0% CPU or 100%?

I had 3 torrents running, put the computer to sleep for 5mins, woke it back up. MonoTorrent treated all the active connections as lost, and then re-connected to the old peers, and resumed downloading within a few seconds of waking back up. Maybe the issue is solved now? I'll close this for now.