ioFTPD performs graceful socket shutdown which might cause up to 6minute delay, if other side is not posting shutdown notification.
Most common implementation is:
...
shutdown(SD_BOTH);
closesocket();
Some servers are doing (wrong implementation, which may cause ioftpd to wait until timeout):
...
closesocket();
ioFTPD does (optimal implementation
):
setsockopt(); // No lingering
...
shutdown(SD_SEND);
recv();
closesocket();