Skip to content

Commit

Permalink
Don't try to send a disconnect packet if never connected. Fixes hiery…
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar committed Apr 5, 2012
1 parent 5046370 commit 93e23f4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -381,7 +381,7 @@ public void disconnect(DisconnectReason reason) {
public void disconnect(DisconnectReason reason, String message) { public void disconnect(DisconnectReason reason, String message) {
close.lock(); close.lock();
try { try {
if (!close.isSet()) { if (isRunning()) {
disconnectListener.notifyDisconnect(reason); disconnectListener.notifyDisconnect(reason);
getService().notifyError(new TransportException(reason, "Disconnected")); getService().notifyError(new TransportException(reason, "Disconnected"));
sendDisconnect(reason, message); sendDisconnect(reason, message);
Expand Down

0 comments on commit 93e23f4

Please sign in to comment.