diff options
author | kjnash <k.j.nash@usa.net> | 2018-06-01 18:34:07 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2018-06-01 18:34:07 (GMT) |
commit | 754bb107b4100f394d445d589dddc94e59dd2d04 (patch) | |
tree | 3580514cb99bbc6fc165317d7d195489b5c83401 /library/http | |
parent | 227db01958097c4aac9a9b57569db68002ab1187 (diff) | |
download | tcl-754bb107b4100f394d445d589dddc94e59dd2d04.zip tcl-754bb107b4100f394d445d589dddc94e59dd2d04.tar.gz tcl-754bb107b4100f394d445d589dddc94e59dd2d04.tar.bz2 |
Bugfix - always cleanup persistent socket.
Diffstat (limited to 'library/http')
-rw-r--r-- | library/http/http.tcl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index d16a8d9..c177374 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -264,8 +264,10 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} { || ([info exists state(-keepalive)] && !$state(-keepalive)) || ([info exists state(connection)] && ($state(connection) eq "close")) } { - CloseSocket $state(sock) $token set closeQueue 1 + set connId $state(socketinfo) + set sock $state(sock) + CloseSocket $state(sock) $token } elseif { ([info exists state(-keepalive)] && $state(-keepalive)) && ([info exists state(connection)] && ($state(connection) ne "close")) @@ -286,11 +288,10 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} { } if { $closeQueue - && [info exists state(socketinfo)] - && [info exists socketMapping($state(socketinfo))] - && ($socketMapping($state(socketinfo)) eq $state(sock)) + && [info exists socketMapping($connId)] + && ($socketMapping($connId) eq $sock) } { - http::CloseQueuedQueries $state(socketinfo) $token + http::CloseQueuedQueries $connId $token } return |