Skip to content
Tcl Source Code History Of Ticket 794839ffffffffff
Login

History Of Ticket 794839ffffffffff

Artifacts Associated With Ticket 794839ffffffffff

  1. Ticket change [1b997e30ec] (rid 123179) by ralfixx on 2003-08-25 18:43:18:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Try to async-connect to a host/port which refuses the
      connection:
      
          proc foo {fd} {
            puts "$fd: errstat [fconfigure -error $fd]"
            close $fd
          }
      
          # chose any port which is not open on local machine
          set port_not_open 65432
          set fd [socket -async localhost $port_not_open]
      
      Now we need some means to get informed when the
      conection is
      available, the manpage tells use to use fileevent.
      
      I find that on IRIX both readable and writable
      fileevents work to
      detect the failed connection:
      
        fileevent $fd readable [list foo $fd]
        fileevent $fd writable [list foo $fd]
      
      both immediately show the failed connection.
      
      However on Windows, only the `writable' fileevent
      triggers, the
      `readable' just hangs around forever.  The same goes
      for connection
      timeouts (host offline): readable fileevents do not
      time out,
      `writables' do.
      
      David Gravereaux said: "... I agree this is a problem.
      Please post this bug to the sourceforge bug db."
      
      So here we are...
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "ralfixx"
    9. subsystem initialized to: "04. Async Events"
    10. title initialized to: "async sockets: readable vs writable fileevents"
    11. type initialized to: "Bug"
  2. Ticket change [91948a7725] (rid 120639) by davygrvy on 2003-09-06 18:51:17:

    1. assignee changed to: "davygrvy"
    2. subsystem changed to: "27. Channel Types"
  3. Ticket change [2c6e36131d] (rid 118902) by davygrvy on 2004-05-06 01:30:25:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Using the following test case:
      
      proc foo {fd which} {
        puts "$fd: errstat $which [fconfigure $fd -error]"
        catch {close $fd}
      }
      set port_not_open 65432
      set fd [socket -async localhost $port_not_open]
      fileevent $fd readable [list foo $fd readable]
      fileevent $fd writable [list foo $fd writable]
      
      I found that when I added the ability for an async connection 
      that returned an error to fire both read and write handlers, 
      only the first would be called due to the 'close $fd'.  If neither 
      closed, both would be called relentlessly.
      
      [committed fix to HEAD]
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  4. Ticket change [12039cd6ba] (rid 95245) by davygrvy on 2004-05-06 01:50:38:

    1. closedate changed to: "2004-05-05T18:50:38"
    2. closer changed to: "davygrvy"
    3. status changed to: "Closed"
  5. Ticket change [fb4b5ba375] (rid 92032) by davygrvy on 2004-05-06 01:51:21:

    1. resolution changed to: "Fixed"