Overview
| Artifact ID: | bd272d972e4f8be8d709290653da191d00a0c697 |
|---|---|
| Ticket: | 1449233fffffffffffffffffffffffffffffffff
Bug when -timeout specified and triggered |
| User & Date: | andreas_kupries on 2006-03-13 23:42:46 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
Assume set token [http::geturl -timeout XXXX badurl] The timeout will trigger, because of the badurl. The "http::geturl" creates a timer to handle the -timeout, with the id stored in state(after). See line 447 of http.tcl. Later on it does a [http::wait] on the token to wait for the connection. See line 479ff. When the timer triggers it calls [http::reset]. See line 447. This deletes the token, i.e. the state array. See line 196ff. The [http::wait] the geturl is in (line 479) then breaks out of the [vwait]-eventloop it is in and returns $state(status), see line 956. Except that the state is already gone due to the aforementioned [reset], therefore boom. Note also, even if the [http::wait] would not throw an error then [http::geturl] itself would, because immediately after the [http::wait] it also tries to access the state array by itself, to determine what went wrong (line 479ff). A possible solution is to use [info exists] to check if the state is gone, and react accordingly (http::wait returns nothing, http::geturl then knows that a timeout happened).
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "andreas_kupries"
- subsystem changed to: "29. http Package"
- title changed to: "Bug when -timeout specified and triggered"
- type changed to: "Bug"