Overview
| Artifact ID: | 3968ceb651dc357e64c94fbcea74c5490dc052a4 |
|---|---|
| Ticket: | 3472316fffffffffffffffffffffffffffffffff
fconfigure <sock> -error called twice in Connect |
| User & Date: | zwischenzugs on 2012-01-11 09:32:04 |
Changes
- assignee changed to: "patthoyts"
- cmimetype changed to: "text/plain"
- comment changed to:
It appears that if you call fconfigure twice on a reset socket (for example) a call to fconfigure <sock> -error can only be called once to retrieve the error. [Terminal 1] T1 $ tclsh % socket -server sockproc 12345 sock5 % [Terminal 2] T2 $ tclsh % socket localhost 12345 sock5 % [Terminal 1] % ^C T1 $ [Terminal 2] % fconfigure sock5 -error connection reset by peer % fconfigure sock5 -error % It seems this causes this if clause to ultimately return an error string which means it's not possible to determine whether the writeable socket has eof and/or threw an error: if { [eof $state(sock)] || [string length [fconfigure $state(sock) -error]] } then { Finish $token "connect failed [fconfigure $state(sock) -error]" 1 } else { tcl8.5.11/library/http/http.tcl As an aside, the documentation for socket appears not to state that the error message can only be retrieved once. If the fconfigure <sock> -error is run twice in quick succession this appears to make no difference (ie I couldn't determine that it was a race condition with sockets still in the OS's memory). - foundin changed to: "obsolete: 8.5.11"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "zwischenzugs"
- subsystem changed to: "29. http Package"
- title changed to: "fconfigure <sock> -error called twice in Connect"
- type changed to: "Bug"