Overview
| Artifact ID: | 5e14e461a50ff41cd7344e96424137b23cb7c166 |
|---|---|
| Ticket: | 2812527fffffffffffffffffffffffffffffffff
ftp library - connection close |
| User & Date: | russellbell on 2009-06-26 03:17:44 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "russellbell"
- subsystem changed to: "55. Other Tools"
- title changed to: "ftp library - connection close"
- type changed to: "Bug"