Artifacts Associated With Ticket 2812527fffffffff
Ticket change [5e14e461a5] (rid 115578) by russellbell on 2009-06-26 03:17:44:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I've found a bug in the ftp client library 2.4.8 that bites when a connection is closed. When you call ::ftp::Close $handle you sometimes get a TCL exception (thrown in an event handler so a catch around ::ftp::Close doesn't help) and sometimes you get an endless loop. Depends on the ftp server you're talk to and doesn't happen consistently, but enough to be annoying. The faulty code is about line 35 of ::ftp::StateHandler which does "set number [gets $sock bufline]". This code reads a continuation line, so normally isn't called after the socket is closed, but sometimes it is and an exception is the result. Fix is to wrap in a catch, easy enough. But then the second bug bites - this code is in a loop and if the gets returns <= 0, the loop is infinite. Fix is to break from the loop, and change the code structure a little to ensure "if { [eof $ftp(CtrlSock)] } ..." gets called in this case. I believe this is a separate issue to 1076923 found by Keith Vetter - that was the gets on line 16 of ::ftp::StateHandler. If it's helpful I can provide source for my fix to ftp 2.4.8, [email protected] - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "russellbell"
- subsystem initialized to: "55. Other Tools"
- title initialized to: "ftp library - connection close"
- type initialized to: "Bug"
Ticket change [4df16eacb0] (rid 127147) by dgp on 2009-06-26 23:57:52:
- assignee changed to: "dgp"
- closedate changed to: "2009-06-26T16:57:52"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 The ftp package is over in the tcllib project.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dgp"