[Mono-dev] Socket has a dynamic GetHashCode method

David Wolinsky davidiw at ufl.edu
Wed Aug 15 12:17:20 EDT 2007


I check the svn and didn't see the fix that Robert had provided, I have 
since added a bugzilla report
http://bugzilla.ximian.com/show_bug.cgi?id=82449

Regards,
David

Miguel de Icaza wrote:
> Hey,
>
>     That sounds like a bug to me.
>
>   
>> Socket relies on the underlying operating system handle for its 
>> HashCode, this creates a problem if later after the underlying resource 
>> has been disposed but the Socket object is still in use....
>>
>> For example...
>>
>> Hashtable ht = new Hashtable();
>> Socket s = new Socket(...);
>> ht[s] = 5;
>> Console.WriteLine(ht.Contains(s)); // true
>> s.Close();
>> Console.WriteLine(ht.Contains(s)); // false
>>
>> Is this a bug or an expected result?
>>
>> Regards,
>> David
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>     
>
>   




More information about the Mono-devel-list mailing list