Tcl Library Source Code

View Ticket
Login
Ticket UUID: 1292966
Title: Performance: connection timeout
Type: Bug Version: None
Submitter: cdclercq Created on: 2005-09-16 14:57:58
Subsystem: ftp Assigned To: gwlester
Priority: 5 Medium Severity:
Status: Open Last Modified: 2005-09-27 05:29:56
Resolution: None Closed By:
    Closed on:
Description:
Hi,

When I try to connect via (latest version 2.4.1):
ftp::Open $some_ip anonymous "" -mode passive

I takes sometimes more than a minut (sometimes a timeout).
* We only have this when starting on Solaris connecting
to Windows via a Fortigate 200 Antivirus Appl. and a
firewall.
* Windows to Windows via Fortigate and firewall works fine.
* Solaris to whatever OS not via Fortigate and firewall
works fine
* When I test the connection via regular UNIX ftp
command -->
no problem

The line of code slowing down is located in ftp.tcl
proc ftp::OpenControlConn
--> set peer [fconfigure $ftp(CtrlSock) -peername]

This line is used only for a DisplayMsg. (I think this
line should be in the if statement, but this is not the
real issue).

I found an old bug report on fconfigure -peername (tcl
project):
[ 533301 ] fconfigure -peername very slow

Does somebody have an idea?

Moving the fconfigure line into the 
#    if { $VERBOSE } {

block fixes my problem when VERBOSE mode is off.
User Comments: cdclercq added on 2005-09-19 14:47:17:
Logged In: YES 
user_id=617750

Please ignor the previous -blocking remark !

cdclercq added on 2005-09-16 22:05:47:
Logged In: YES 
user_id=617750

Very bizar when I change the line to 

    set peer [fconfigure $ftp(CtrlSock) -peername -blocking 1]
OR !!!! (it does not matter???)
    set peer [fconfigure $ftp(CtrlSock) -peername -blocking 0]

Both work FAST ??? (Via Solaris tcl_patchLevel  8.4.5)