diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c
index d3e766e014..4e6b20a2b2 100644
--- a/libs/esl/fs_cli.c
+++ b/libs/esl/fs_cli.c
@@ -61,6 +61,7 @@ typedef struct {
 
 static int warn_stop = 0;
 static int connected = 0;
+static int allow_ctl_c = 0;
 static char prompt_str[512] = "";
 static cli_profile_t profiles[128] = {{{0}}};
 static cli_profile_t internal_profile = {{ 0 }};
@@ -480,7 +481,7 @@ static BOOL console_readConsole(HANDLE conIn, char *buf, int len, int *pRed, int
 
 static void handle_SIGINT(int sig)
 {
-	if (!connected) {
+	if (!connected || allow_ctl_c) {
 		fprintf(stdout, "Interrupted.\n");
 		exit(1);
 	}
@@ -979,7 +980,6 @@ int main(int argc, char *argv[])
 	int temp_log = -1;
 	int argv_error = 0;
 	int argv_exec = 0;
-	int ctl_c = 0;
 	char argv_command[1024] = "";
 	char argv_loglevel[128] = "";
 	int argv_quiet = 0;
@@ -1048,7 +1048,7 @@ int main(int argc, char *argv[])
 				argv_quiet = 1;
 				break;
 			case 'i':
-				ctl_c = 1;
+				allow_ctl_c = 1;
 				break;
 			case 'r':
 				loops += 120;
@@ -1126,9 +1126,7 @@ int main(int argc, char *argv[])
 				esl_log(ESL_LOG_INFO, "Retrying\n");
 			}
 		} else {
-			if (!ctl_c) {
-				connected = 1;
-			}
+			connected = 1;
 			if (temp_log < 0 ) {
 				esl_global_set_default_logger(profile->debug);
 			} else {