1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-25 09:01:48 +02:00

Report ssh error if available

This commit is contained in:
Konstantin Knizhnik 2019-08-01 11:43:17 +03:00 committed by Grigory Smolkin
parent 6a721aa004
commit daca207735

View File

@ -58,8 +58,9 @@ void fio_error(int rc, int size, char const* file, int line)
char buf[PRINTF_BUF_SIZE];
int err_size = read(fio_stderr, buf, sizeof(buf));
if (err_size > 0)
elog(LOG, "Agent error: %s", buf);
elog(ERROR, "Communication error: %s", rc >= 0 ? "end of data" : strerror(errno));
elog(ERROR, "Agent error: %s", buf);
else
elog(ERROR, "Communication error: %s", rc >= 0 ? "end of data" : strerror(errno));
}
}