When using LineMode, I've determined that calling TCustomWSocket.Abort will cause my OnDataAvailable event to fire *during* the call to Abort.
My dilemma is that Abort is being called during the handling of an OnDataAvailable event. While that data is being handled, but before it is completely handled, TCustomWSocket.Abort is called because an exception occurred. During the process of "aborting", TCustomLineWSocket.TriggerSessionClosed is called. Because FLineMode is True and FRcvdCnt > 0, TriggerDataAvailable is called. I've worked around this by setting LineMode := False in my OnBgException event handler. But I'm wondering if this is a bug in ICS. For example, TCustomSSLSocket.InternalAbort calls DeleteBufferedData. It would seem reasonable that once Abort is called, and data received and pending is thrown away, rather than calling OnDataAvailable again during the Abort. Thoughts? -- Jon Robertson Borland Certified Advanced Delphi 7 Developer Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% attention to detail. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be