Hello,
After a big fight with deadlocks and race conditions for one day my
threaded TWSocketServer derivation is now working stable.
(tested with Wilfrieds GPRS Client and other stressing clients)
But.. I have still a tiny problem with ThreadDetach.
An AV is sometimes raised (see MadExcept trace
Isn't it possible that the client is already destroyed when you call
ThreadDetech ? If yes,
accessing self in ThreadDetach cause the access violation.
Each time a client is freed, it must be remove from the list to avoid this
problem.
--
Contribute to the SSL Effort. Visit
Francois Piette wrote:
Isn't it possible that the client is already destroyed when you call
ThreadDetech ? If yes, accessing self in ThreadDetach cause the access
violation.
Yes, very simple, that seems to be the reason. I think I've fixed it by
just waiting for all threads return and being
From: Vander Clock Stephane
[..]
I think you must replace
S := Copy(S, 5, Length(S));
by
S := Copy(S, 6, Length(S));
I don't know why, length of both strings is 5 not 6.
Typically the lines in question of a EHLO response look like
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-AUTH
DZ-Jay wrote:
since the CompareText calls Copy() with an Index of
1, which means that it starts to delete at the second character, not to
mention the call to Delete() uses an Index of 1 also.
This should have been:
which means that it starts to copy at the second character...