diff --git a/websocket-sharp/Net/HttpListenerPrefixCollection.cs b/websocket-sharp/Net/HttpListenerPrefixCollection.cs index 66afe787..dcc54476 100644 --- a/websocket-sharp/Net/HttpListenerPrefixCollection.cs +++ b/websocket-sharp/Net/HttpListenerPrefixCollection.cs @@ -194,11 +194,12 @@ namespace WebSocketSharp.Net /// public bool Contains (string uriPrefix) { + if (_listener.IsDisposed) + throw new ObjectDisposedException (_listener.GetType ().ToString ()); + if (uriPrefix == null) throw new ArgumentNullException ("uriPrefix"); - _listener.CheckDisposed (); - return _prefixes.Contains (uriPrefix); }