diff options
author | sandeep <sandeep> | 2000-03-29 20:19:59 (GMT) |
---|---|---|
committer | sandeep <sandeep> | 2000-03-29 20:19:59 (GMT) |
commit | 903cf0c3a7c1b8a6e73f5991bae107beb43e9d21 (patch) | |
tree | ea5e82551999ec440334e3db9d5a6b3ac133cfe6 /library/http | |
parent | 48a5129685b2db326b67643086f7c11c70fdcfb6 (diff) | |
download | tcl-903cf0c3a7c1b8a6e73f5991bae107beb43e9d21.zip tcl-903cf0c3a7c1b8a6e73f5991bae107beb43e9d21.tar.gz tcl-903cf0c3a7c1b8a6e73f5991bae107beb43e9d21.tar.bz2 |
2000-03-29 Sandeep Tamhankar <sandeep@scriptics.com>
* library/http2.1/http.tcl: Removed an unnecessary fileevent
statement from the error processing part of the Write method.
Also, fixed two potential memory leaks in wait and reset, in which
the state array wasn't being unset before throwing an exception.
Prior to this version, Brent checked in a fix to catch a
fileevent statement that was sometimes causing a stack trace when
geturl was called with -timeout. I believe Brent's fix is
necessary because TLS closes bad sockets for secure connections,
and the fileevent was trying to act on a socket that no longer
existed.
Diffstat (limited to 'library/http')
-rw-r--r-- | library/http/http.tcl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 16a6d05..617684c 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.27 2000/03/27 21:22:11 welch Exp $ +# RCS: @(#) $Id: http.tcl,v 1.28 2000/03/29 20:19:59 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -177,7 +177,7 @@ proc http::reset { token {why reset} } { Finish $token if {[info exists state(error)]} { set errorlist $state(error) - unset state(error) + unset state eval error $errorlist } } @@ -545,7 +545,6 @@ proc http::Write {token} { fileevent $s readable [list http::Event $token] } } err]} { - fileevent $s writable {} Finish $token $err } } @@ -718,7 +717,7 @@ proc http::wait {token} { } if {[info exists state(error)]} { set errorlist $state(error) - unset state(error) + unset state eval error $errorlist } return $state(status) |