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.
SOTHDEVAsked:
Who is Participating?
 
SOTHDEVAuthor Commented:
There was a bug in my version of kbMW when creating pooled clients it did not copy the FonClientException.
Seems to be resolved now.
0
 
Sinisa VukCommented:
Please post your code here. I assume you doing something wrong. Indy will not loop infinitive - I sure.
0
 
SOTHDEVAuthor Commented:
I have tracked this further and may be a problem with the TkbmMWTCPIPIndyClientTransport middle layer I am using. I have an OnException Event tied to my Client Object,
but in kbmMWClient

function TkbmMWCustomClient.InternalSendRequest(AServiceName,AServiceVersion:string; AStateID:integer; AFunc:string; {$IFDEF KBMMW_LICENSE_MESSAGING}AAsync:boolean; var ARequestID:integer;{$ENDIF} const Args:array of Variant):Variant;
.
.
.
                                   on E: Exception do
                                   begin
                                        if Assigned(FTransport.FOnClientException) 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.
0
 
SOTHDEVAuthor Commented:
Once I corrected the 3rd Party code it resolved the issue
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.