-
Notifications
You must be signed in to change notification settings - Fork 86
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
Is there any socket timeout implemented on MLLPClient? #18
Comments
Checking the communication with Wireshark, I found the message is being sent (by send_message() ) but the server did not anwer and did not close the connection, so it remains opened indefinitely... I know this is not a normal use case but the library should close the socket if the other side does not, after a period of time... at least in my opinion... |
I have the same problem. |
Hi @aventrax @rvmey , According to your experience, what is your desired timeout? When I can, I'll try to fix this and do some testing. |
In our use case, we're using python-hl7 to send messages. The connection is dropped somewhere and python-hl7 doesn't know that the connection is timed out and the socket is hangs open, blocking other processes. Our desired timeout would be 10s, but I would hope that the configuration option would be exposed for tuning. Alternatively, would it possible to expose the underlying socket object for advanced use cases? |
Hello, I'm using this library to perform some health check on a HL7 service that is receiving messages.
The logic is: everything is good if I have back a message (AA or AE doesn't matter), but give me an error if the service does not respond or the answer is not understandable (HL7 standard).
I'm trying to trap the possible errors on the MLLPClient call, and it throws me error if the service's port is closed/firewalled or if the service doesn't respond at all to my send_message .
The problem is: If perform this health check and the server doesn't respond but does not close the socket, the MLLPClient blocks my health check. In other words it seems there is not any timeout implemented.
Is there any chance to have this kind of timeout implemented? I have tried to do it myself, modifying the client.py, but unsuccessfully... Can you help me? Thanks
The text was updated successfully, but these errors were encountered: