diff --git a/cli/src/main/java/org/jboss/as/cli/handlers/OperationRequestHandler.java b/cli/src/main/java/org/jboss/as/cli/handlers/OperationRequestHandler.java
index <HASH>..<HASH> 100644
--- a/cli/src/main/java/org/jboss/as/cli/handlers/OperationRequestHandler.java
+++ b/cli/src/main/java/org/jboss/as/cli/handlers/OperationRequestHandler.java
@@ -89,6 +89,8 @@ public class OperationRequestHandler implements CommandHandler, OperationCommand
                 }
                 if (cur instanceof ClientException) {
                     ctx.printLine("Error: " + cur.getLocalizedMessage());
+                    //This avoids the hang trying to execute a new command by forcing the client to reconnect
+                    ctx.disconnectController();
                     return;
                 }
             }
Avoid hangs when the remote end is closed, e.g. by :shutdown