Hello Arno,

I found it. It is like you say. In TryToSend there is no check, and in
OnSessionClose I deactivate a lower level proto layer, and this one
sends a 'deactivate' packet.

What happens is that State is still wsConnected in OnSessionClose, and I
use it in that layer to send or not send the deactivate packet. So what
is happening is that Send - TryToSend is called from within the
OnSessionClosed and generating the second Close with the 10054 error.
It is easy to demonstrate this way.

Thank you Arno. Now I have to make a few changes that it does not send
that packet.

I think the check of FCloseInvoked should also be done in TryToSend dont
you think ?

Rgds, Wilfried [TeamICS]

Monday, January 16, 2006, 11:29, Wilfried Mestdagh wrote:

> Hello Arno,

>> You may be right since in procedure TCustomWSocket.TryToSend FCloseInvoked

> You are right, and I think that is the problem. I still have to check
> because it's a rather complicated thing. But I think the 'Sending TCP
> packet' is done from in the OnSessionClosed event handler. I think it
> then can come into the TryToSend, generating the second OnSessionClosed.

> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to