Skip to content
Browse files

add Channel.join()

  • Loading branch information...
1 parent 7ccd078 commit c8de9ed915774a7a16d9eedd67bd9500c2b8509c @shikhar shikhar committed
View
7 src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java
@@ -83,7 +83,7 @@
/** Channel open event */
protected final Event<ConnectionException> open;
/** Channel close event */
- private final Event<ConnectionException> close;
+ protected final Event<ConnectionException> close;
/* Access to these fields should be synchronized using this object */
private boolean eofSent;
@@ -267,6 +267,11 @@ public void close()
}
}
+ public void join()
+ throws ConnectionException {
+ close.await();
+ }
+
protected synchronized void sendClose()
throws TransportException {
try {
View
3 src/main/java/net/schmizz/sshj/connection/channel/Channel.java
@@ -135,4 +135,7 @@ void sendEOF()
*/
void setAutoExpand(boolean autoExpand);
+ void join()
+ throws ConnectionException;
+
}

0 comments on commit c8de9ed

Please sign in to comment.
Something went wrong with that request. Please try again.