Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add meaningful error message to 0 bytes received on socket #6

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  Enyim.Caching/Memcached/BasicNetworkStream.cs
View
3  Enyim.Caching/Memcached/BasicNetworkStream.cs
@@ -89,7 +89,8 @@ public override int Read(byte[] buffer, int offset, int count)
if (errorCode == SocketError.Success && retval > 0)
return retval;
- throw new System.IO.IOException(String.Format("Failed to read from the socket '{0}'. Error: {1}", this.socket.RemoteEndPoint, errorCode == SocketError.Success ? "?" : errorCode.ToString()));
+ string errorMessage = errorCode == SocketError.Success ? "SocketError value was Success, but 0 bytes were received" : errorCode.ToString();
+ throw new System.IO.IOException(String.Format("Failed to read from the socket '{0}'. Error: {1}", this.socket.RemoteEndPoint, errorMessage));
}
public override long Seek(long offset, SeekOrigin origin)
Something went wrong with that request. Please try again.