Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
2  src/main/java/net/schmizz/sshj/transport/TransportImpl.java
@@ -381,7 +381,7 @@ public void disconnect(DisconnectReason reason) {
381 381 public void disconnect(DisconnectReason reason, String message) {
382 382 close.lock();
383 383 try {
384   - if (!close.isSet()) {
  384 + if (isRunning()) {
385 385 disconnectListener.notifyDisconnect(reason);
386 386 getService().notifyError(new TransportException(reason, "Disconnected"));
387 387 sendDisconnect(reason, message);

0 comments on commit 93e23f4

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