+
+2008-12-03 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * UdpClient.cs: don't Poll() in Receive(), the call to ReceiveFrom
+ will block anyway. Fixes bug #455894.
+
+2008-11-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * Socket.cs: mark the socket as not connected when there is a pending
+ error or exception about to be thrown.
+ Bug #443346 fixed.
+
2008-09-10 Bill Holmes <billholmes54@gmail.com>
* Socket.cs : Adding a comment to provide locations where
public void CheckIfThrowDelayedException ()
{
if (delayedException != null) {
+ Sock.connected = false;
throw delayedException;
}
- if (error != 0)
+ if (error != 0) {
+ Sock.connected = false;
throw new SocketException (error);
+ }
}
void CompleteAllOnDispose (Queue queue)
{
CheckDisposed ();
- // Bug 45633: the spec states that we should block until a datagram arrives:
- // remove the 512 hardcoded value.
-
- // Block until we get it.
- socket.Poll (-1, SelectMode.SelectRead);
-
- byte [] recBuffer;
- int available = socket.Available;
-
- recBuffer = new byte [available];
+ byte [] recBuffer = new byte [65536]; // Max. size
EndPoint endPoint = new IPEndPoint (IPAddress.Any, 0);
int dataRead = socket.ReceiveFrom (recBuffer, ref endPoint);
if (dataRead < recBuffer.Length)