> Sometimes client can disconnect on multithreaded server while send, after
that I receive 
> "Range check error" or "Socket is not connected (#10057 in Send)"

> How can I avoid these errors?
> I'm checking client state before send.
> Must I ignore both these errors? If yes, I can understand to ignore
"#10057", but why shuld I ignore "range check error".
> It is very rarely error (one time on 1.000.000 send), but it happens every
day on my server.

You can safely ignore error 10057 but you should not get any "Range check
error".
Please add ICS source path to your project so that the source are compiled,
do not use package and then run under debugger. This way, you'll find
exactly where the Range Check Error exception occurs and from then we can
probably help you.

If you can't reproduce the issue using the debugger, then use madExcept
which will produce a stack trace when the exception occurs and we'll also
know where it is exactly.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com





-----Message d'origine-----
De : TWSocket [mailto:twsocket-boun...@lists.elists.org] De la part de ?????
???????
Envoyé : samedi 21 décembre 2013 14:07
À : twsocket@lists.elists.org
Objet : [twsocket] Errors while send, if client disconnected from socket

Hello

Sometimes client can disconnect on multithreaded server while send, after
that I receive "Range check error" or "Socket is not connected (#10057 in
Send)"

How can I avoid these errors?
 I'm checking client state before send.
Must I ignore both these errors? If yes, I can understand to ignore
"#10057", but why shuld I ignore "range check error".
It is very rarely error (one time on 1.000.000 send), but it happens every
day on my server.

//TTCPClient = class(TsslWSocketTHrdClient)

  if (FTcpClient as TTCPClient).state = wsConnected then
        try
          (ftcpclient as TTCPClient).Send(data, 4); // here error (in debug
I see that client disconnected after entering in function Send
        except
          on e: exception do
            log.debug('Error in sendstr TClient.writelnuncompressed:' +
e.Message);
        end;


Thank you.
--
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

-- 
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

Reply via email to