From 7c8e505f416a5b839dfac24a61515fe6e021ae44 Mon Sep 17 00:00:00 2001 From: welch Date: Wed, 7 Jul 1999 01:58:19 +0000 Subject: Fixed handling of connection timeouts. --- library/http/http.tcl | 5 ++++- library/http2.0/http.tcl | 5 ++++- library/http2.1/http.tcl | 5 ++++- library/http2.3/http.tcl | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/library/http/http.tcl b/library/http/http.tcl index dc3c890..84069ad 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.6 1999/06/30 17:43:51 welch Exp $ +# RCS: @(#) $Id: http.tcl,v 1.7 1999/07/07 01:58:19 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -238,6 +238,9 @@ proc http::geturl { url args } { #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token + if {[string compare $state(status) "timeout"] == 0} { + return + } fileevent $s writable {} unset state(status) } diff --git a/library/http2.0/http.tcl b/library/http2.0/http.tcl index dc3c890..84069ad 100644 --- a/library/http2.0/http.tcl +++ b/library/http2.0/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.6 1999/06/30 17:43:51 welch Exp $ +# RCS: @(#) $Id: http.tcl,v 1.7 1999/07/07 01:58:19 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -238,6 +238,9 @@ proc http::geturl { url args } { #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token + if {[string compare $state(status) "timeout"] == 0} { + return + } fileevent $s writable {} unset state(status) } diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index dc3c890..84069ad 100644 --- a/library/http2.1/http.tcl +++ b/library/http2.1/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.6 1999/06/30 17:43:51 welch Exp $ +# RCS: @(#) $Id: http.tcl,v 1.7 1999/07/07 01:58:19 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -238,6 +238,9 @@ proc http::geturl { url args } { #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token + if {[string compare $state(status) "timeout"] == 0} { + return + } fileevent $s writable {} unset state(status) } diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl index dc3c890..84069ad 100644 --- a/library/http2.3/http.tcl +++ b/library/http2.3/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.6 1999/06/30 17:43:51 welch Exp $ +# RCS: @(#) $Id: http.tcl,v 1.7 1999/07/07 01:58:19 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -238,6 +238,9 @@ proc http::geturl { url args } { #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token + if {[string compare $state(status) "timeout"] == 0} { + return + } fileevent $s writable {} unset state(status) } -- cgit v0.12