This commit is contained in:
@@ -153,17 +153,20 @@ public class SocksRunner implements Runnable {
|
|||||||
new StreamCompletionHandler(remoteChannel, channel).completed(0, null);
|
new StreamCompletionHandler(remoteChannel, channel).completed(0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void closeRunner(final Throwable e) {
|
public void closeRunner(final Throwable e) {
|
||||||
if (closed) return;
|
if (closed) return;
|
||||||
closed = true;
|
synchronized (this) {
|
||||||
try {
|
if (closed) return;
|
||||||
channel.close();
|
closed = true;
|
||||||
} catch (Throwable t) {
|
try {
|
||||||
}
|
channel.close();
|
||||||
context.offerBuffer(buffer);
|
} catch (Throwable t) {
|
||||||
buffer = null;
|
}
|
||||||
if (e != null && finest) {
|
context.offerBuffer(buffer);
|
||||||
logger.log(Level.FINEST, "close socks channel by error", e);
|
buffer = null;
|
||||||
|
if (e != null && finest) {
|
||||||
|
logger.log(Level.FINEST, "close socks channel by error", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user