Studied this issue further, and it still exists in the latest developement version. Cause for it is not in io, but in windows socket API...
As some of you know, ioFTPD tries to bind active (PORT a,b,c,d,x,y) mode transfers to 'server listen port - 1', which is normal behaviour on unix ftp daemons (proftpd, wuftpd, ...) In other words, it tries to use same source port for every active mode transfer. Combine this with winsock, tcp lingering, fast transfers & limited amount of destination ports - and you'll end up getting errors:
Bind(1.2.3.4:5.6) + Connect(4.3.6.4:9.5) => Success
Close() => Linger
Bind(1.2.3.4:5.6) + Connect(4.3.6.4:9.6) => Success
Close() => Linger
Bind(1.2.3.4:5.6) + Connect(4.3.6.4:9.7) => Success
Close() => Linger
Bind(1.2.3.4:5.6) + Connect(4.3.6.4:9.5) => Fail, similar lingering connection exists (identical source & destination addressess)
... ~30secs ....
Lingering connections are removed by winsock.
...
Bind(1.2.3.4:5.6) + Connect(4.3.6.4:9.5) = Success
Close() => Linger
|