X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fhelper%2Fcommand.c;h=9d19cff4f870630555d545565bfdbf0e7a445bfa;hp=c29f1130ca6e5824771b28b746efc4f4ec0c62f9;hb=33bb0fe6194b697bfc7e89338c0ffac1c54d09be;hpb=20fcd0729e7187e8fe6a38ce53b0a1b95ea647fb diff --git a/src/helper/command.c b/src/helper/command.c index c29f1130ca..9d19cff4f8 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -660,7 +660,10 @@ int command_run_line(struct command_context *context, char *line) Jim_DeleteAssocData(interp, "context"); } if (retcode == JIM_ERR) { - if (retval != ERROR_COMMAND_CLOSE_CONNECTION) { + if (retval == ERROR_COMMAND_CLOSE_CONNECTION) { + /* Shutdown request is not an error */ + return ERROR_OK; + } else { /* We do not print the connection closed error message */ Jim_MakeErrorMessage(interp); LOG_USER("%s", Jim_GetString(Jim_GetResult(interp), NULL));