SocketSession

Jan 3, 2013 at 4:53 AM

Hi, kerryjiang.

Please look at below code, it's part of "SocketSession.cs"

        /// <summary>
        /// Starts the sending.
        /// </summary>
        public void StartSend()
        {
            if (Interlocked.CompareExchange(ref m_InSending, 1, 0) == 1)
                return;

            var sendingItems = GetSendingItems();

            if (!AppSession.TryGetSendingData(sendingItems))
                Interlocked.Decrement(ref m_InSending);

            Send(sendingItems);
        }

I think it should not send "sendingItems" when there is no sendingItems.

So, I think the code should be modified like this..

if (!AppSession.TryGetSendingData(sendingItems)) {
     Interlocked.Decrement(ref m_InSending);
     return;
}

How about your opinion?

 

Thanks.

 

Regards,

Jayden

Coordinator
Jan 8, 2013 at 3:34 AM

The latest code has changed the implementation.

Please download SuperSocket 1.5 stable!