summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-01-13 11:48:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-01-13 11:48:48 (GMT)
commit14c7b573fc0d6f98fe016525ca46a0dc752062a1 (patch)
treef28a6f1e1dead1cdcebbda48194d4ad899c6c6dd /library
parent25bd6a60dd33cdd71ba5704d8a0ef1cfcfed0050 (diff)
parentdd2ad07b7f17937585812360682cef3aed8ceb86 (diff)
downloadtcl-14c7b573fc0d6f98fe016525ca46a0dc752062a1.zip
tcl-14c7b573fc0d6f98fe016525ca46a0dc752062a1.tar.gz
tcl-14c7b573fc0d6f98fe016525ca46a0dc752062a1.tar.bz2
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we
only try to read the socket error exactly once.
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 9c2d43d..1a82c2e 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -863,12 +863,11 @@ proc http::cleanup {token} {
proc http::Connect {token} {
variable $token
upvar 0 $token state
- global errorInfo errorCode
if {
[eof $state(sock)] ||
- [string length [fconfigure $state(sock) -error]]
+ [set err [fconfigure $state(sock) -error]] ne ""
} then {
- Finish $token "connect failed [fconfigure $state(sock) -error]" 1
+ Finish $token "connect failed $err" 1
} else {
set state(status) connect
fileevent $state(sock) writable {}