You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/03/18 23:22:24 UTC
git commit: THRIFT-2339 Uncaught exception in thrift c# driver
Repository: thrift
Updated Branches:
refs/heads/master a6b328f12 -> d26f6fde0
THRIFT-2339 Uncaught exception in thrift c# driver
Patch: Janis Ser
Github Pull Request: This closes #79
----
commit d650ca3380aac39eae1f17dc72d4097eb3394562
Author: JSSTR <ja...@struq.com>
Date: 2014-01-29T13:49:51Z
Update TSocket.cs
Make sure to catch all exceptions in the ConnectCallback.
----
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/d26f6fde
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/d26f6fde
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/d26f6fde
Branch: refs/heads/master
Commit: d26f6fde008c8336931b4a29577719646cad805d
Parents: a6b328f
Author: Jens Geyer <je...@apache.org>
Authored: Wed Mar 19 00:21:49 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Wed Mar 19 00:21:49 2014 +0200
----------------------------------------------------------------------
lib/csharp/src/Transport/TSocket.cs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/d26f6fde/lib/csharp/src/Transport/TSocket.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/Transport/TSocket.cs b/lib/csharp/src/Transport/TSocket.cs
index 7717cfb..35fbe97 100644
--- a/lib/csharp/src/Transport/TSocket.cs
+++ b/lib/csharp/src/Transport/TSocket.cs
@@ -177,16 +177,21 @@ namespace Thrift.Transport
if( hlp.Client.Client != null)
hlp.Client.EndConnect(asyncres);
}
- catch (SocketException)
+ catch (Exception)
{
// catch that away
}
if (hlp.DoCleanup)
{
- asyncres.AsyncWaitHandle.Close();
- if (hlp.Client is IDisposable)
- ((IDisposable)hlp.Client).Dispose();
+ try {
+ asyncres.AsyncWaitHandle.Close();
+ } catch (Exception) {}
+
+ try {
+ if (hlp.Client is IDisposable)
+ ((IDisposable)hlp.Client).Dispose();
+ } catch (Exception) {}
hlp.Client = null;
}
}