SOTHDEV
asked on
Infinite loop in Indy Exception Handling
Using Delphi, I have a client / server application which requires an Indy (from 2016) based connection. The problem scenario is very specific. During a data transfer from the Server, the Server disconnects. Indy recognizes this and Raises an Exception (usually 10054) but can fall in to an infinite loop, where it just continues to raise the same Exception over and over again. This exception is only seen in Debug mode, so just appears as an infinite loop to a client. I have a Try / Except block surrounding the test operation in an attempt to catch the Exception but it never exits.
Please post your code here. I assume you doing something wrong. Indy will not loop infinitive - I sure.
ASKER
I have tracked this further and may be a problem with the TkbmMWTCPIPIndyClientTrans port middle layer I am using. I have an OnException Event tied to my Client Object,
but in kbmMWClient
function TkbmMWCustomClient.Interna lSendReque st(AServic eName,ASer viceVersio n:string; AStateID:integer; AFunc:string; {$IFDEF KBMMW_LICENSE_MESSAGING}AA sync:boole an; var ARequestID:integer;{$ENDIF } const Args:array of Variant):Variant;
.
.
.
on E: Exception do
begin
if Assigned(FTransport.FOnCli entExcepti on) then
begin
It does not find it assigned. I will have to track it down, as every other event on FTransport seems to be assigned properly.
but in kbmMWClient
function TkbmMWCustomClient.Interna
.
.
.
on E: Exception do
begin
if Assigned(FTransport.FOnCli
begin
It does not find it assigned. I will have to track it down, as every other event on FTransport seems to be assigned properly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Once I corrected the 3rd Party code it resolved the issue