UnBindEventHandler not trigering in version (1.1.21.5)

.NET library for SMPP protocol
Locked
syam
Posts: 5
Joined: Tue Feb 23, 2016 10:50 am

UnBindEventHandler not trigering in version (1.1.21.5)

Post by syam » Mon Mar 14, 2016 5:34 am

Dear Support,

This event was working with earlier version(1.0.12.0). but with with new version(1.1.21.5) it is not firing. This event is very much critical to us, it is after this event we are making the reconnect attempts. With the new version this event is not working, hence we were not able to know the unbind occurrence and the system is not able to start the reconnect

Code: Select all

objSMPP.evUnBind += new Inetlab.SMPP.Common.UnBindEventHandler(client_evUnBind);

Code: Select all

private void client_evUnBind(object sender, UnBind data)
        {
            try
            {
                int index;
                index = lstSMSCclientSMPP.IndexOf((SmppClient)sender);
                tmrBind.Enabled = true;
                objLogger.log("Unbind Occured on : " + lstSMPPConfig[index].ConnectionName + "  Sequneceno " + data.Sequence.ToString(), "Trace");
                ShortCodeAvailable_MT = objNpCustom.GetRouteAvailableforMT(lstSMPPConfig);
                foreach (SMPPConfig obj in lstSMPPConfig)
                {
                    objLogger.log("Bind Status of " + lstSMPPConfig[index].ConnectionName + " : " + obj.Binded.ToString(), "Trace");  
                }
                lstSMPPConfig[index].Binded = false;
            }
            catch (Exception ex)
            {
                objLogger.log(ex.Message, "Error");
                objLogger.log(ex.ToString(), "Error");
            }
        }
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: UnBindEventHandler not trigering in version (1.1.21.5)

Post by alt » Mon Mar 14, 2016 5:08 pm

Hello syam,

Sometimes remote side drops connection without sending UnBind PDU.
I suggest you to use event evDisconnected to start reconnect.
Locked