Socket Exception (wodFtpDLX / wodFtpDLX.NET)

by Daniel Dority, (3395 days ago)

I have five threads processing 200 download requests each for a total of 1000 files through their own instance of an FtpDlx object.

Each client ALWAYS throws this exception when it has processed exactly 130 files:

[code]System.IO.IOException: Unable to read data from the transport connection: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at WeOnlyDo.Net.Sockets.SSLSocket.EndReceive(IAsyncResult ar)
at WeOnlyDo.Net.Sockets.ProxySocket.EndReceive(IAsyncResult asyncResult)
at WeOnlyDo.Protocols.FTPplain.ReceiveNotification(IAsyncResult ar)[/code]


Initiating call: [inlinecode]m_FtpDlx.GetFile(Path.GetTempFileName(), "PATH_ON_SERVER");[/inlinecode]

I can replicate this behavior every single time with a single client or dozens.

I do receive a StateChange event with the above mentioned exception and a state change to Disconnected.

I do recover gracefully from this; however, I am curious as to the root cause.

(Thoughts?)

FtpDLX client settings (options not mentioned use vendor defaults)
[code]
Port: 21
Protocol: 2 (FTPS)
Timeout: 0
Passive: true
Blocking: false
TransferMode: 0 (Binary)
[/code]

locked

Complete thread: