[
https://issues.apache.org/jira/browse/NET-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753998#action_12753998
]
Chuck Batka edited comment on NET-274 at 9/10/09 9:48 PM:
----------------------------------------------------------
I was having a sporadic issue with the control socket closing soon after
switching back to plainSocket with CCC. A short series of commands or
operations could usually finish successfully but anything taking longer than a
few seconds would end with a control socket closure.
Moving the sslNegotiation() local variable "SSLSocket socket" to be an instance
variable solved the issue of the layered secure sockets' disposal tearing down
the plainSocket.
Thank you.
.
.
.
/** The FTPS {...@link TrustManager} implementation. */
private TrustManager trustManager = new FTPSTrustManager();
/** The {...@link KeyManager} */
private KeyManager keyManager;
private SSLSocket socket;
.
.
.
was (Author: cb_pa):
I was having a sporadic issue with the control socket closing soon after
switching back to plainSocket with CCC. A short series of commands or
operations could usually finish successfully but anything taking longer than a
few seconds would end with a control socket closure.
Moving the sslNegotiation() local variable "SSLSocket socket" to be an instance
variable solved the issue of the layered secure sockets' disposal tearing down
the plainSocket.
Thank you.
> Commands issued after CCC command fails in Commons Net 2.0
> ----------------------------------------------------------
>
> Key: NET-274
> URL: https://issues.apache.org/jira/browse/NET-274
> Project: Commons Net
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: Windows XP
> Reporter: Srikanth KM
> Fix For: 2.1
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When the FTP Client communicates with FTP Server in Explicit SSL mode, after
> the exchange of data channel security commands, the Client issues the CCC
> command (Clear Command Channel). A reply code of 200 is received for the CCC
> command. However, the subsequent commands issued fails with the error ::
> org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed
> without indication.
> This is occuring because after issuing the CCC Command ,(in sendCommand of
> FTPSClient) the socket is switched to plane socket whereas the Input and
> output streams of the socket _controlInput_ and _controlOutput_ still point
> to the older secure socket.
> This issue can be resolved by adding the following lines in the sendCommand
> () of FTPSClient after switching thesocket to plainSocket
> _socket_ = planeSocket;
> _controlInput_ = new BufferedReader(new InputStreamReader( _socket_
> .getInputStream(), getControlEncoding()));
> _controlOutput_ = new BufferedWriter(new OutputStreamWriter(
> _socket_.getOutputStream(), getControlEncoding()));
> Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.