Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bd5ff4be05465774f7f24f83de41e44152497cae3d5e020111a6c1d26c5c0a4f
Ticket: 874321ffffffffffffffffffffffffffffffffff
Timeout during connect
User & Date: kjnash on 2022-09-09 16:50:33
Changes

  1. assignee changed to: "aku"
  2. closer changed to: "nobody"
  3. 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)
    }
    
  4. 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.
    
  5. login: "kjnash"
  6. mimetype: "text/x-fossil-plain"
  7. severity changed to: "Minor"