Skip to content

Commit

Permalink
Fix two compile errors from the recent refactoring
Browse files Browse the repository at this point in the history
svn path=/trunk/bitsharp/; revision=139019
  • Loading branch information
alanmcgovern committed Jul 29, 2009
1 parent 5b659c7 commit 6598d93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/MonoTorrent.Tests/Client/DiskWriterTests.cs
Expand Up @@ -172,7 +172,7 @@ public void WriteFail()
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[Piece.BlockSize]);
BufferedIO io = new BufferedIO(null, buffer, 0, Piece.BlockSize, Piece.BlockSize * 4, rig.Torrent.Files, "Path");
io.Id = new PeerId(new Peer("", new Uri("tcp://123.123.123")), rig.Manager);
rig.Engine.DiskManager.QueueWrite(io);
rig.Engine.DiskManager.QueueWrite(io, null);

Assert.IsTrue(handle.WaitOne(50000, true), "Failure was not handled");
}
Expand Down
10 changes: 6 additions & 4 deletions src/SampleClient/main.cs
Expand Up @@ -268,11 +268,13 @@ private static void shutdown()
BEncodedDictionary fastResume = new BEncodedDictionary();
for (int i = 0; i < torrents.Count; i++)
{
WaitHandle handle = torrents[i].Stop(); ;
while (!handle.WaitOne(10, true))
Console.WriteLine(handle.ToString());
torrents[i].Stop(); ;
while (torrents[i].State != TorrentState.Stopped)
{
Console.WriteLine("{0} is {1}", torrents[i].Torrent.Name, torrents[i].State);
Thread.Sleep(250);
}

Console.WriteLine(handle.ToString());
fastResume.Add(torrents[i].Torrent.InfoHash.ToHex (), torrents[i].SaveFastResume().Encode());
}

Expand Down

0 comments on commit 6598d93

Please sign in to comment.