diff --git a/websocket-sharp/Net/HttpListenerPrefixCollection.cs b/websocket-sharp/Net/HttpListenerPrefixCollection.cs index 6b0bc0c0..14e0012b 100644 --- a/websocket-sharp/Net/HttpListenerPrefixCollection.cs +++ b/websocket-sharp/Net/HttpListenerPrefixCollection.cs @@ -267,7 +267,8 @@ namespace WebSocketSharp.Net /// public bool Remove (string uriPrefix) { - _listener.CheckDisposed (); + if (_listener.IsDisposed) + throw new ObjectDisposedException (_listener.GetType ().ToString ()); if (uriPrefix == null) throw new ArgumentNullException ("uriPrefix");