Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e7cf57bfd1fc97e6e9d1b671175ddb2b95e06f7e
Ticket: 2446662fffffffffffffffffffffffffffffffff
chanIO.test failures on Win32 msys/mingw
User & Date: davygrvy on 2009-01-01 07:33:28
Changes

  1. icomment:
    Alexandre, I've been looking at this issue a bit.  Apparently, Google is rude.  I guess they just consider a client initiated graceful close to be a full close.  There was always some weird stuff around http/1.0 anyways.  I guess they are being defensive.  By doing so, they have to collect the TIME_WAITs on their side.
    
    I tested some other services, and got an appropriate closure without loss.
    
    proc go1 {} {
        set s [socket mail.pobox.com smtp]
        fconfigure $s -buffering line -blocking 0
        fileevent $s readable [list gotreadable $s]
        puts $s "ehlo [lindex [fconfigure $s -sockname] 1]"
        puts $s "quit"
        close $s w
    }
    
    proc go2 {} {
        set s [socket www.google.com http]
        fconfigure $s -buffering line -blocking 0
        fileevent $s readable [list gotreadable $s]
        puts $s "GET / HTTP/1.1\n"
        close $s w
    }
    
    proc gotreadable {chan} {
        if {[string length [set err [fconfigure $chan -error]]]} {
            puts $err
            close $chan
            return
        }
        if {[gets $chan data] != -1} {
            puts $data
        }
        if {[eof $chan]} {
            puts "got eof"
            close $chan
        }
    }
    
    
    
  2. login: "davygrvy"
  3. mimetype: "text/plain"
  4. username: "davygrvy"