index f115e3e2a51088efdf2dec9e5547ffa1a60642cc..3814f0c2def7a239d8397d9cad4558cbd52112ae 100644 (file)
--- a/src/tools/sysdb/input.c
+++ b/src/tools/sysdb/input.c
#include "tools/sysdb/input.h"
#include "tools/sysdb/command.h"
+#include "utils/error.h"
#include "utils/strbuf.h"
#include <sys/select.h>
if (! FD_ISSET(client_fd, &fds))
continue;
+ if (sdb_client_eof(sysdb_input->client)) {
+ /* XXX: try to reconnect */
+ printf("\n");
+ sdb_log(SDB_LOG_ERR, "Remote side closed the connection.");
+ /* return EOF */
+ return 0;
+ }
+
/* some response / error message from the server pending */
/* XXX: clear current line */
printf("\n");