[banshee] Change the way timeouts are handled during a podcast download
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Change the way timeouts are handled during a podcast download
- Date: Sun, 26 Apr 2009 13:22:22 -0400 (EDT)
commit 50e614dca03f59b0a0056d87cc8efb3a97f7c3a1
Author: Mike Urbanski <michael c urbanski gmail com>
Date: Sun Apr 26 19:14:54 2009 +0200
Change the way timeouts are handled during a podcast download
Fixes the bug where podcasts would stop downloading after 60 seconds
(BGO #538397).
---
src/Libraries/Migo/Migo.Net/AsyncWebClient.cs | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs b/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
index 1402e1e..4d1871d 100644
--- a/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
+++ b/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
@@ -74,7 +74,7 @@ namespace Migo.Net
private TransferStatusManager tsm;
- private ManualResetEvent readTimeoutHandle;
+ private AutoResetEvent readTimeoutHandle;
private RegisteredWaitHandle registeredTimeoutHandle;
private bool busy;
@@ -588,7 +588,7 @@ namespace Migo.Net
int length = (cLength == -1 || cLength > 8192) ? 8192 : (int) cLength;
Stream dest = null;
- readTimeoutHandle = new ManualResetEvent (true);
+ readTimeoutHandle = new AutoResetEvent (false);
byte[] buffer = null;
@@ -632,11 +632,7 @@ namespace Migo.Net
IAsyncResult ar;
- readTimeoutHandle.Set ();
-
while (nread != 0) {
- readTimeoutHandle.Reset ();
-
// <hack>
// Yeah, Yeah, Yeah, I'll change this later,
// it's here to get around abort issues.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]