Connection reset error in FTP client

Hello,

I've been programming a FTP client in java. Itís being compiled as an application with JDK version 1.6.0_12. It automatically sends a NOOP command if 30 seconds have passed without a message being sent over the control stream. If I upload a large file, one that takes more than 30 seconds to transfer, the control stream will remain idle for those 30 seconds and a NOOP will be due. However, when my application sends this command some kind of error occurs - or more specifically when I attempt to receive the response to the NOOP command a ďjava.net.SocketException: Connection resetĒ error is thrown. As I said this error only occurs when I attempt to send a message on the control stream simultaneously with doing something on the data stream.