[
https://issues.apache.org/jira/browse/FTPSERVER-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646546#action_12646546
]
Mikael Svahn commented on FTPSERVER-219:
----------------------------------------
Yes, I hope this patch will solve the problem. I'm currently running some tests
to verify it.
Here is the patch:
Index: src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java
===================================================================
--- src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java
(revision 712407)
+++ src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java
(working copy)
@@ -311,6 +311,7 @@
} else {
LOG.debug("Opening passive data connection");
dataSoc = servSoc.accept();
+ dataSoc.setSoTimeout(dataConfig.getIdleTime() * 1000);
LOG.debug("Passive data connection opened");
}
} catch (Exception ex) {
> The STOR command hangs thread in passive mode
> ---------------------------------------------
>
> Key: FTPSERVER-219
> URL: https://issues.apache.org/jira/browse/FTPSERVER-219
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0-M3, 1.0-M4
> Environment: Debian Linux
> Jdk 1.6.0_10
> Reporter: Mikael Svahn
>
> If a client does not disconnect a STOR command correct, for instance due to
> bad transmission the reader thread might hang. I think there must be a
> timeout on socket read.
> - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[],
> int, int, int) @bci=0 (Interpreted frame)
> - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129
> (Interpreted frame)
> - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
> - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258
> (Compiled frame)
> - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317
> (Interpreted frame)
> - java.io.FilterInputStream.read(byte[]) @bci=5, line=90 (Interpreted frame)
> -
> org.apache.ftpserver.impl.IODataConnection.transfer(org.apache.ftpserver.ftplet.FtpSession,
> boolean, java.io.InputStream, java.io.OutputStream, int) @bci=133, line=236
> (Interpreted frame)
> -
> org.apache.ftpserver.impl.IODataConnection.transferFromClient(org.apache.ftpserver.ftplet.FtpSession,
> java.io.OutputStream) @bci=51, line=129 (Interpreted frame)
> -
> org.apache.ftpserver.command.impl.STOR.execute(org.apache.ftpserver.impl.FtpIoSession,
> org.apache.ftpserver.impl.FtpServerContext,
> org.apache.ftpserver.ftplet.FtpRequest) @bci=344, line=147 (Interpreted frame)
> -
> org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(org.apache.ftpserver.impl.FtpIoSession,
> org.apache.ftpserver.ftplet.FtpRequest) @bci=160, line=135 (Interpreted
> frame)
> -
> org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession,
> java.lang.Object) @bci=33, line=62 (Interpreted frame)
> -
> org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(org.apache.mina.core.filterchain.IoFilter$NextFilter,
> org.apache.mina.core.session.IoSession, java.lang.Object) @bci=51, line=752
> (Inte
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.