From: Roger Meier Date: Sun, 19 Feb 2012 18:53:08 +0000 (+0000) Subject: THRIFT-1517 TTransport.ReadAll() should set exception type to EndOfFile X-Git-Tag: 0.9.1~444 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=2fbde0eff0e17b66e6c2ea931bd5882607e019c4;p=common%2Fthrift.git THRIFT-1517 TTransport.ReadAll() should set exception type to EndOfFile Patch: Stefan Gmeiner git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1291039 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/csharp/src/Transport/TTransport.cs b/lib/csharp/src/Transport/TTransport.cs index 520ba469..3fbc5d67 100644 --- a/lib/csharp/src/Transport/TTransport.cs +++ b/lib/csharp/src/Transport/TTransport.cs @@ -53,7 +53,9 @@ namespace Thrift.Transport ret = Read(buf, off + got, len - got); if (ret <= 0) { - throw new TTransportException("Cannot read, Remote side has closed"); + throw new TTransportException( + TTransportException.ExceptionType.EndOfFile, + "Cannot read, Remote side has closed"); } got += ret; }