Permalink
Browse files

still having _transport is null issues. starting to think it is part …

…of an overly aggressive GC routine. issue #40
  • Loading branch information...
1 parent 01c0b30 commit b6b4d5729e2b987f30d80563fb0fc400306b5b36 @nberardi nberardi committed Jun 20, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/Connections/Connection.cs
@@ -46,6 +46,9 @@ internal Connection(Server server, IConnectionBuilder builder)
case ConnectionType.Framed:
_transport = new TFramedTransport(socket);
break;
+
+ default:
+ goto case ConnectionType.Framed;
}
_protocol = new TBinaryProtocol(_transport);
@@ -77,11 +80,11 @@ public bool IsOpen
{
get
{
+ if (_transport == null)
+ return false;
+
lock (_transport)
{
- if (_transport == null)
- return false;
-
try { return _transport.IsOpen; }
catch { return false; }
}

0 comments on commit b6b4d57

Please sign in to comment.