Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bd272d972e4f8be8d709290653da191d00a0c697
Ticket: 1449233fffffffffffffffffffffffffffffffff
Bug when -timeout specified and triggered
User & Date: andreas_kupries on 2006-03-13 23:42:46
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. 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).
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "andreas_kupries"
  9. subsystem changed to: "29. http Package"
  10. title changed to: "Bug when -timeout specified and triggered"
  11. type changed to: "Bug"