YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
Send Keep Alive
Leonidkr
#1 Posted : Monday, July 26, 2010 7:29:03 PM
Rank: Newbie

Medals:

Groups: Member
Joined: 7/21/2010
Posts: 8
Points: 24
Location: Israel

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I got exception from the following string is SendkeepAlive (SIP_Flow.cs)


Code:
                 
if (m_pStack.TransportLayer.Stack.Logger != null)
{
     m_pStack.TransportLayer.Stack.Logger.AddWrite("", null, 2, "Flow [id='" + this.ID + "'] sent \"ping\"", this.LocalEP, this.RemoteEP);
}
try
{
         SendInternal(new byte[]{(byte)'\r',(byte)'\n',(byte)'\r',(byte)'\n'});
}
catch{
         // We don't care about errors here.
}


The reason is that this.ID ( or this.LocalEP) throws exception when m_IsDisposed is true.

But no one catches them. So it is thrown to the "Non-handled exceptions" block. So I suggest to change position of "try" block is the following way


Code:
                 
if (m_pStack.TransportLayer.Stack.Logger != null)
{
      try
      {
           m_pStack.TransportLayer.Stack.Logger.AddWrite("", null, 2, "Flow [id='" + this.ID + "'] sent \"ping\"", this.LocalEP, this.RemoteEP);
      }
      SendInternal(new byte[]{(byte)'\r',(byte)'\n',(byte)'\r',(byte)'\n'});
}
catch{
         // We don't care about errors here.
}



Is it OK?
ivx
#2 Posted : Saturday, July 31, 2010 11:01:25 AM
Rank: Administration

Medals:

Groups: Administration
Joined: 9/15/2006
Posts: 1,278
Points: 3,707

Thanks: 0 times
Was thanked: 13 time(s) in 13 post(s)

Hi,

Yes logging must be in try catch too, i fixed it in SVN version.
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

SoClean Theme By Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 RC1 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.049 seconds.