Skip to content

Commit 9570db0

Browse files
committed
[Issue #203] Fix
1 parent cddc778 commit 9570db0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/backup.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync)
352352
dir_list_file(backup_files_list, parray_get(external_dirs, i),
353353
false, true, false, i+1, FIO_DB_HOST);
354354

355-
/* close ssh session in main thread */
356-
fio_disconnect();
357-
358355
/* Sanity check for backup_files_list, thank you, Windows:
359356
* https://github.com/postgrespro/pg_probackup/issues/48
360357
*/
@@ -529,6 +526,9 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync)
529526
arg->ret = 1;
530527
}
531528

529+
/* close ssh session in main thread */
530+
fio_disconnect();
531+
532532
/* Run threads */
533533
thread_interrupted = false;
534534
elog(INFO, "Start transferring data files");

src/utils/file.c

+1
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ int fio_open(char const* path, int mode, fio_location location)
368368
if (hdr.arg != 0)
369369
{
370370
errno = hdr.arg;
371+
fio_fdset &= ~(1 << hdr.handle);
371372
return -1;
372373
}
373374
fd = i | FIO_PIPE_MARKER;

0 commit comments

Comments
 (0)