Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIdHL7.SynchronousSend does not respect timouts #501

Open
rlebeau opened this issue Oct 2, 2023 · 0 comments
Open

TIdHL7.SynchronousSend does not respect timouts #501

rlebeau opened this issue Oct 2, 2023 · 0 comments
Assignees
Labels
Element: HL7 Issues related to TIdHL7 Status: Review Needed Issue needs further review to decide next status Type: Bug Issue is a bug in existing code

Comments

@rlebeau
Copy link
Member

rlebeau commented Oct 2, 2023

See post on Delphi Praxis:
https://en.delphipraxis.net/topic/10228-tidhl7synchronoussend-does-not-respect-timouts/

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 ... the timeouts are set for 60 seconds

... today's tests show that the app sends the messages every second time (I mean, the first call returns srOK and a valid reply, the second, srTimout and no reply, the third, as the first, srOK and the fourth, as the second, srTimeout, and so on). Looking into code I noticed that when the AsynchronousSend returns srTimeout the method DropClientConnection is called... I suppose that could be the cause of such a behavior...

I also tried to use another approach. I changed the CommunicationMode to cmSingleThread, and then I was calling SendMessage and GetReply. Unfortunatelly, without success. GetReply returned srNone evere time. It is quite strange because, as one can read in comments, the state srNone is internally used and (should be) never returned

@rlebeau rlebeau added Type: Bug Issue is a bug in existing code Status: Review Needed Issue needs further review to decide next status Element: HL7 Issues related to TIdHL7 labels Oct 2, 2023
@rlebeau rlebeau self-assigned this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Element: HL7 Issues related to TIdHL7 Status: Review Needed Issue needs further review to decide next status Type: Bug Issue is a bug in existing code
Projects
None yet
Development

No branches or pull requests

1 participant