ftpErrorSocket

After our application has run for some time we start to get ftpErrorSocket every time we try to log in. Restarting the application fixes the problem. What does this error mean?

Everytime I log off I call Abort followed by Close to make sure it has fully closed down. Could it be that sockets are still being left open?

Thanks,
Graham

Hello ..

When you release the object you can be sure that the socket has been closed and freed correctly.

Are you reusing the FTPConnection object? In this case create a new one for every new connection.

Regards,
-Mat


Hello ..

When you release the object you can be sure that the socket has been closed and freed correctly.

Are you reusing the FTPConnection object? In this case create a new one for every new connection.

Regards,
-Mat

We do not re-use the connection object. Do you have any idea why this error can occur? Netstat does not show any open sockets.

Are you able to reproduce this problem with a simple application I could run here?
The ftpErrorSocket is returned if the socket cannot created or any socket related operations fail.

Regards,
-Mat

I have sent an e-mail to you with a test application attached.

Graham

I've got your sample application.

I get the following error after opening around 4000 connections in 4 minutes:

[20060308 19:15:27] Connecting to 127.0.0.1 Port: 21
[20060308 19:15:27] Only one usage of each socket address (protocol/network address/port) is normally permitted.

The problem is further discussed here:
http://blogs.msdn.com/dgorti/archive/20 ... 70766.aspx

Regards,
-Mat