Hi there,
I have a problem with TIdHL7 (Windows 8, Delphi XE4, Indy, ver. 10.6.2.0). Of course, I am trying to solve it by myself, but still without success. Anyway, here is a piece of code which makes me crazy...
// stopping IdHL7 before configuration
if IdHL7.Going then IdHL7.Stop;
// setting timeouts and server address
IdHL7.ReceiveTimeout := 1 * 60 * 1000;
IdHL7.Timeout := 1 * 60 * 1000;
IdHL7.IsListener := False;
IdHL7.Address := SERVER_ADDRESS;
IdHL7.Port := SERVER_PORT;
// starting the connection
IdHL7.Start;
IdHL7.WaitForConnection(10000);
// getting and sending some messages from DB
while not AQuery.EOF do begin
AMessage := AQuery.FieldByName('MessageToSend').AsString;
AReturn := IdHL7.SynchronousSend(AMessage, AReply); // This is a problematic line ...
AQuery.Next;
end;
As one can see I want to send some HL7 messages to SERVER. The server is online and it gets the messages send by SynchronousSend method and responds for them (confirmed). My logs show that the code works as expected but only for the very first call SynchronousSend (the method returns srOK and a valid reply sent byt the remote server). Unfortunatelly, every next call of SynchronousSend returns srTimouts, even if the result is returned just a few miliseconds after call, what is strange because, as you can see, the timeouts are set for 60 seconds 😕
What I am doing wrong? What I am missing?
@Remy Lebeau as everyone knows, You are the undisputed Guru on this topic, so I am sure it is a piece of cake for you. Could you be so nice to help?