Originally posted by Levy Lazarre
# CloseDataConn -- ## Closes all sockets and files used by the data conection## Arguments:# None.## Returns:# None.#proc ::ftp::CloseDataConn {s } { upvar ::ftp::ftp$s ftp # Protect the destination channel from destruction if it came # from the caller. Closing it is not our responsibility. if {[info exists ftp(get:channel)]} { catch {unset ftp(get:channel)} catch {unset ftp(DestCI)} } catch { unset ftp(AC) } catch {after cancel $ftp(Wait)} catch {fileevent $ftp(DataSock) readable {}} catch {close $ftp(DataSock); unset ftp(DataSock)} catch {close $ftp(DestCI); unset ftp(DestCI)} catch {close $ftp(SourceCI); unset ftp(SourceCI)} catch {close $ftp(DummySock); unset ftp(DummySock)} return}