Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 68344473ee3ee59544d0bc57debca78bfcce8d5f
Ticket: 5425f2c08257f7d9660276c4c8f764ad2d178e1c
Async socket connect may flag error and still connects
User & Date: oehhar on 2013-11-12 08:52:47
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <h1>Issue</h1>
    In an asyncroneous socket connect, there might be errors flagged even if the connect finally succeedes.
    
    This appeared on MAC-OS X with tcl8.6.1.
    
    <h1>Demo</h1>
    We have a server socket on an IPV6 enabled system which only binds to the IPV4 address.
    This might be done in a tclsh console with the following program:
    <verbatim>
    % proc accept {s a p} {
         puts ok
    }
    % socket -server accept -myaddr 127.0.0.1 61680
    sock192
    % vwait a
    </verbatim>
    
    In a second tclsh, the following is run:
    <verbatim>
    % set client [socket -async localhost 61680]
    sock103825910
    % fconfigure $client -error
    connection refused
    % update
    % fconfigure $client -error
    % fconfigure $client -sockname
    ::1 localhost 64153
    </verbatim>
    
    The issue is the flagged "connection refused" and the final connect.
    
    <h1>References</h1>
    
    Reported by DKF on Ticket [13d3af3ad5] and copied here by oehhar.
    
  5. foundin changed to: "8.6.1"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "25. Channel System"
  15. title changed to: "Async socket connect"
  16. type changed to: "Bug"