Artifacts Associated With Ticket 794839
Ticket change [1b997e30ec] (rid 123179) by ralfixx on 2003-08-25 18:43:18:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Try to async-connect to a host/port which refuses the connection: proc foo {fd} { puts "$fd: errstat [fconfigure -error $fd]" close $fd } # chose any port which is not open on local machine set port_not_open 65432 set fd [socket -async localhost $port_not_open] Now we need some means to get informed when the conection is available, the manpage tells use to use fileevent. I find that on IRIX both readable and writable fileevents work to detect the failed connection: fileevent $fd readable [list foo $fd] fileevent $fd writable [list foo $fd] both immediately show the failed connection. However on Windows, only the `writable' fileevent triggers, the `readable' just hangs around forever. The same goes for connection timeouts (host offline): readable fileevents do not time out, `writables' do. David Gravereaux said: "... I agree this is a problem. Please post this bug to the sourceforge bug db." So here we are... - foundin initialized to: "obsolete: 8.3.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ralfixx"
- subsystem initialized to: "04. Async Events"
- title initialized to: "async sockets: readable vs writable fileevents"
- type initialized to: "Bug"
Ticket change [91948a7725] (rid 120639) by davygrvy on 2003-09-06 18:51:17:
- assignee changed to: "davygrvy"
- subsystem changed to: "27. Channel Types"
Ticket change [2c6e36131d] (rid 118902) by davygrvy on 2004-05-06 01:30:25:
- icomment:
Logged In: YES user_id=7549 Using the following test case: proc foo {fd which} { puts "$fd: errstat $which [fconfigure $fd -error]" catch {close $fd} } set port_not_open 65432 set fd [socket -async localhost $port_not_open] fileevent $fd readable [list foo $fd readable] fileevent $fd writable [list foo $fd writable] I found that when I added the ability for an async connection that returned an error to fire both read and write handlers, only the first would be called due to the 'close $fd'. If neither closed, both would be called relentlessly. [committed fix to HEAD] - login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [12039cd6ba] (rid 95245) by davygrvy on 2004-05-06 01:50:38:
- closedate changed to: "2004-05-05T18:50:38"
- closer changed to: "davygrvy"
- status changed to: "Closed"
Ticket change [fb4b5ba375] (rid 92032) by davygrvy on 2004-05-06 01:51:21:
- resolution changed to: "Fixed"