-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packet corrupt #506
Comments
@configuration
} @slf4j
// public static Session openSession(JSch jSch, String userName, String password, String host, int port, int timeout) throws CustomException {
// public static ChannelSftp createSftp(Session session) throws CustomException {
// public static ChannelShell openShellChannel(Session session, int timeout) throws CustomException {
} @slf4j
// String pwd = channelSftp.pwd();
} public class SftpFactory extends BasePooledObjectFactory implements AutoCloseable {
} @DaTa
} |
Hi @huang-xuan, We will need to provide more specifics about whatever exception or issue you are seeing in order to provide any sort of assistance. Thanks, |
I have found that reconnecting to an older session causes this problem. Throw away the session and create and connect a new one. |
I would highly discourage anyone from trying to reuse a Session object after it has been disconnected as I am confident that there are subtle bugs that will prevent it from working reliably. |
I think that could be communicated better (or at all?). Perhaps even throw an exception in that case? |
No, because there are active users that despite the subtle bugs are reusing Session objects for whatever reason. |
Use commons-pool2 to customize the thread pool. It is OK to upload files for the first time. After a while, the error Packet corrupt is reported. Is it related to seesion reuse?
The text was updated successfully, but these errors were encountered: