Code

sysdb: Do an attempt to reconnect on all user input.
[sysdb.git] / src / tools / sysdb / command.c
index f9195a644057ee9b2c849f4f764f4ef6bacd65d4..5044c0e5213aac42cb4456cd9dafe465264f4010 100644 (file)
@@ -174,13 +174,10 @@ sdb_command_exec(sdb_input_t *input)
                --query_len;
 
        if (sdb_client_eof(input->client)) {
-               sdb_client_close(input->client);
-               if (sdb_client_connect(input->client, input->user)) {
-                       printf("Failed to reconnect to SysDBd.\n");
+               if (sdb_input_reconnect()) {
                        clear_query(input);
                        return NULL;
                }
-               printf("Successfully reconnected to SysDBd.\n");
        }
 
        if (query_len) {