summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-01-13 11:50:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-01-13 11:50:41 (GMT)
commit7af0b5a02b894a6f609aa9ab5bbbb1124754b610 (patch)
tree36bb1e33c7e4d45938ff1a46b32a87ce96ca3811
parent15b74ef01faf9ca538aa987d8e8f6d64952e5b02 (diff)
parent14c7b573fc0d6f98fe016525ca46a0dc752062a1 (diff)
downloadtcl-7af0b5a02b894a6f609aa9ab5bbbb1124754b610.zip
tcl-7af0b5a02b894a6f609aa9ab5bbbb1124754b610.tar.gz
tcl-7af0b5a02b894a6f609aa9ab5bbbb1124754b610.tar.bz2
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we
only try to read the socket error exactly once.
-rw-r--r--ChangeLog5
-rw-r--r--library/http/http.tcl5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f4f73f3..a15a7e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-13 Donal K. Fellows <dkf@users.sf.net>
+
+ * library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we
+ only try to read the socket error exactly once.
+
2012-01-12 Donal K. Fellows <dkf@users.sf.net>
* doc/tclvars.n: [Bug 3466506]: Document more environment variables.
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 12820af..a30c576 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -867,12 +867,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 ""
} {
- Finish $token "connect failed [fconfigure $state(sock) -error]" 1
+ Finish $token "connect failed $err" 1
} else {
set state(status) connect
fileevent $state(sock) writable {}