monotorrent icon indicating copy to clipboard operation
monotorrent copied to clipboard

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

Open ManlyMarco opened this issue 2 years ago • 1 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.

ManlyMarco avatar Feb 08 '23 12:02 ManlyMarco

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.

ManlyMarco avatar Feb 14 '23 17:02 ManlyMarco

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%?

alanmcgovern avatar Jul 28 '24 22:07 alanmcgovern

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.

alanmcgovern avatar Jul 28 '24 22:07 alanmcgovern