[ 
https://issues.apache.org/jira/browse/THRIFT-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152290#comment-14152290
 ] 

Jens Geyer edited comment on THRIFT-2719 at 9/29/14 9:06 PM:
-------------------------------------------------------------

{code}
try
{
     if( hlp.Client.Client != null)
          hlp.Client.EndConnect(asyncres);
}
catch (Exception)
{
     // catch that away
}
catch (ObjectDisposedException)
{
     // catch that away
}
{code}

I'm sorry, but that dog don't hunt. It gives me an CS0160 error, because the 
less specific {{catch (Exception)}} block [already catches the 
exception|http://msdn.microsoft.com/en-us/library/0yd65esw.aspx]. 

What am I doing wrong?



was (Author: jensg):
{code}
                try
                {
                    if( hlp.Client.Client != null)
                        hlp.Client.EndConnect(asyncres);
                }
                catch (Exception)
                {
                    // catch that away
                }
                catch (ObjectDisposedException)
                {
                    // catch that away
                }
{code}

I'm sorry, but that dog don't hunt. It gives me an CS0160 error, because the 
less specific {{catch (Exception)}} block [already catches the 
exception|http://msdn.microsoft.com/de-de/library/0yd65esw.aspx]. 

What am I doing wrong?


> ObjectDisposedException in TSocket when sending rapidly
> -------------------------------------------------------
>
>                 Key: THRIFT-2719
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2719
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>    Affects Versions: 0.9.1
>            Reporter: Nils Hügelmann
>            Assignee: Jens Geyer
>         Attachments: thrift-2719-fix.patch
>
>
> Test code opens a connection, fires one request, then closes the connection 
> in a loop. In my environment, i get an ObjectDisposedException for a socket 
> object in TSocket.cs after a few hundred requests. I'm not sure what causes 
> this, i suspect some underlying socket reusing.
> Attached patch fixes the issue.
> If you require more info to accept this, i cannot promise that i will be able 
> to deliver that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to