2025-05-22
| ||
09:14 | • New ticket [48eddca89e] http:geturl https://localhost:8143/info hangs when server not running. artifact: 45d0b0632d user: anonymous | |
Ticket Hash: | 48eddca89ea79b5cb6477d5f9f46cc890873cf92 | ||
Title: | http:geturl https://localhost:8143/info hangs when server not running | ||
Status: | Open | Type: | Code Defect |
Severity: | Critical | Priority: | |
Subsystem: | Resolution: | ||
Last Modified: |
2025-05-22 09:14:23 1.7 days ago |
Created: |
2025-05-22 09:14:23 1.7 days ago |
Version Found In: | 1.8, commit ca1a846290, but affects older and newer commits as well |
User Comments: | ||||
anonymous added on 2025-05-22 09:14:23:
There is a subtle bug when trying to connect to a server not running via http::geturl using tcltls. tcltls waits for the connection and loops endlessly not giving the Tcl event loop the chance to handle timer events for a timeout. Example code to reproduce:
The problem is fixed with the following patch. Another way to correct the issue might be to change the Tcl http package to set the socket to async even when waiting for the initial connection but this seems to be a bigger effort. I consider and endless loop in a Tcl command as problematic so I decided to avoid it. Keep in mind that tcltls properly aborts the loop for async sockets during the connection phase.
|