Overview
| Artifact ID: | bd5ff4be05465774f7f24f83de41e44152497cae3d5e020111a6c1d26c5c0a4f |
|---|---|
| Ticket: | 874321ffffffffffffffffffffffffffffffffff
Timeout during connect |
| User & Date: | kjnash on 2022-09-09 16:50:33 |
Changes
- assignee changed to: "aku"
- closer changed to: "nobody"
- comment changed to:
If http::geturl used with -timeout > 0 it may timeout in the middle of the transaction since there is no after cancel except in http::Finish which is too late. Fix: Add this to http::Connect if {[info exists state(after)]} { after cancel $state(after) unset state(after) } - icomment:
For the DNS lookup issue, see also bug [824251] "async client sockets block for DNS" in Sec. 27 "Channel Types". http::geturl now has an optional workaround that allows the script to wait in the event loop while the connection is made. Another possible interpretation of "timeout" is that it applies after a period of inactivity - not only when creating the socket, but at any time in the transaction. This would not be difficult to implement - the timeout event would be cancelled and re-started whenever an event handler is called. However, we do not need two timeout flags. The documented -timeout remains.
- login: "kjnash"
- mimetype: "text/x-fossil-plain"
- severity changed to: "Minor"