Author: alanmc
Date: 2006-12-03 12:12:35 -0500 (Sun, 03 Dec 2006)
New Revision: 68909
Modified:
trunk/bitsharp/src/MonoTorrent.Client/ConnectionListener.cs
Log:
Added property so i can tell when i've disposed my listener.
Modified: trunk/bitsharp/src/MonoTorrent.Client/ConnectionListener.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/ConnectionListener.cs 2006-12-03
17:11:44 UTC (rev 68908)
+++ trunk/bitsharp/src/MonoTorrent.Client/ConnectionListener.cs 2006-12-03
17:12:35 UTC (rev 68909)
@@ -161,14 +161,19 @@
/// <param name="disposing"></param>
public void Dispose(bool disposing)
{
- try
- {
- this.socket.Close();
- }
- catch
- {
- }
+ if (disposed)
+ throw new ObjectDisposedException(this.ToString());
+
+ this.socket.Close();
+ this.disposed = true;
}
+
+
+ internal bool Disposed
+ {
+ get { return this.disposed; }
+ }
+ private bool disposed;
#endregion
}
}
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches