StreamCopyThread: Do not let flush interrupt a write.
flush calls interrupt() to interrupt a pending read and trigger a
flush. Unfortunately that interrupt() call can also interrupt a
pending write, putting Jsch in a bad state and triggering "Short read
of block" errors.
Change-Id: I11f8a014fd72df06617cc8731d992eb14cc32a67
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
writeLock = new Object();
}
- /**
- * Request the thread to flush the output stream as soon as possible.
- * <p>
- * This is an asynchronous request to the thread. The actual flush will
- * happen at some future point in time, when the thread wakes up to process
- * the request.
- */
- @Deprecated
- public void flush() {
- synchronized (writeLock) {
- interrupt();
- }
- }
-
/**
* Request that the thread terminate, and wait for it.
* <p>