diff options
author | Dick Porter <dick@acm.org> | 2002-11-13 19:28:01 +0300 |
---|---|---|
committer | Dick Porter <dick@acm.org> | 2002-11-13 19:28:01 +0300 |
commit | 243a8ee50a7231bb629561487f8c59b87a5a58f6 (patch) | |
tree | e308a365a532197a7d8c1315ac5a072bfb9667ca /mcs/class/System/System.Net.Sockets | |
parent | 1e2a83c38876aaf1410bc976917d38ffd39a832c (diff) |
2002-11-13 Dick Porter <dick@ximian.com>
* Socket.cs: Only close the socket in one place, ie the Dispose
method. Fixes bug 32054.
svn path=/trunk/mcs/; revision=8969
Diffstat (limited to 'mcs/class/System/System.Net.Sockets')
-rw-r--r-- | mcs/class/System/System.Net.Sockets/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System/System.Net.Sockets/Socket.cs | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog index 967ff252f3f..e31e2bc7ba2 100644 --- a/mcs/class/System/System.Net.Sockets/ChangeLog +++ b/mcs/class/System/System.Net.Sockets/ChangeLog @@ -1,3 +1,8 @@ +2002-11-13 Dick Porter <dick@ximian.com> + + * Socket.cs: Only close the socket in one place, ie the Dispose + method. Fixes bug 32054. + 2002-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com> * Socket.cs: offset == size == 0 it's ok in Send (). diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index 08478caade1..36086ef24b5 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -541,8 +541,7 @@ namespace System.Net.Sockets private extern static void Close_internal(IntPtr socket); public void Close() { - connected=false; - Close_internal(socket); + this.Dispose(); } // Connects to the remote address @@ -965,7 +964,9 @@ namespace System.Net.Sockets // Release unmanaged resources this.disposed=true; - this.Close(); + + connected=false; + Close_internal(socket); } } |