Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't try to send a disconnect packet if never connected. Fixes GH-67.

  • Loading branch information...
commit 93e23f4cfb7cccfa37e32ef1a65fb3b04f33857b 1 parent 5046370
Shikhar Bhushan shikhar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/main/java/net/schmizz/sshj/transport/TransportImpl.java
2  src/main/java/net/schmizz/sshj/transport/TransportImpl.java
View
@@ -381,7 +381,7 @@ public void disconnect(DisconnectReason reason) {
public void disconnect(DisconnectReason reason, String message) {
close.lock();
try {
- if (!close.isSet()) {
+ if (isRunning()) {
disconnectListener.notifyDisconnect(reason);
getService().notifyError(new TransportException(reason, "Disconnected"));
sendDisconnect(reason, message);
Please sign in to comment.
Something went wrong with that request. Please try again.