mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 15:50:57 +03:00
Removed Java 7 backport Socket utilities (#880)
This commit is contained in:
@@ -22,8 +22,6 @@ import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
|
||||
|
||||
public class SocketStreamCopyMonitor
|
||||
extends Thread {
|
||||
|
||||
@@ -43,7 +41,7 @@ public class SocketStreamCopyMonitor
|
||||
await(y);
|
||||
} catch (IOException ignored) {
|
||||
} finally {
|
||||
IOUtils.closeQuietly(channel, asCloseable(socket));
|
||||
IOUtils.closeQuietly(channel, socket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.hierynomus.sshj.backport.Sockets.asCloseable;
|
||||
|
||||
public class LocalPortForwarder {
|
||||
|
||||
public static class ForwardedChannel
|
||||
@@ -78,7 +76,7 @@ public class LocalPortForwarder {
|
||||
chan.open();
|
||||
chan.start();
|
||||
} catch (IOException e) {
|
||||
IOUtils.closeQuietly(chan, asCloseable(socket));
|
||||
IOUtils.closeQuietly(chan, socket);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user