Slow timeout when trying to connect to an invalid IP address
See original GitHub issueFrom #615
python -m pynetdicom echoscu [invalid IP] 11112 -d -ta 5
Should immediately fail due to non-existent IP, but doesn’t.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[SOLVED] How to Fix the ERR_CONNECTION_TIMED_OUT ...
Ways to Fix Err_Connection_Timed_Out Error · Method 1: Try VPN · Method 2: Flush DNS Cache · Method 3: Check Your Connection ·...
Read more >How to Fix the ERR_CONNECTION_TIMED_OUT Error - Kinsta
1. Check Your Connection · Restart your home or office router. This only takes a few minutes and solves more problems than a...
Read more >What Does a Server Connection Timeout Mean?
A server connection timeout means that a server is taking too long to reply to a data request made from another device. Timeouts...
Read more >Why am I getting a connection timeout error with ssh?
Whenever I try to ssh to a public ip address from my windows 10 computer, I get an error that looks like ssh:...
Read more >Why is a Website 'Taking Too Long to Respond' & How to Fix
The error is usually sent if the client cannot get a response within 30 seconds. The connection attempt is then terminated.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed with #618
After writing all the below, the simplest simplest way is to probably just put
None
onDUL.to_user_queue
when the connection fails so the blockingrsp = self.dul.receive_pdu(...)
returns. Maybe see if there’s a way to get a better log message in that case.The state machine for the start of association requests is
Where
So while we’re operating in Sta4, the ACSE timeout should be idle until Evt2 occurs and we reach Sta5. There seems to be a step missing in
_negotiate_as_requestor()
after sending the A-ASSOCIATE request primitive to the DUL insend_request()
and prior torsp = self.dul.receive_pdu(wait=True, timeout=self.acse_timeout)
where we wait until the connection has been made.I’d be inclined to put in a timeout check (based on network_timeout?) in between that waits on Sta5.
It’s probably better to use a threading event there with the other end tied to the socket.connect() code so the ACSE only containues once the connection request is made or failed.
Alternatively you could just lock the thread into the socket.connect() code until timeout… but that might have weird effects when running an AE with multiple SCPs that needs to make association requests.
I really hate threading…