Skip to content

Commit

Permalink
Merge pull request #433 from tianrenz2/invalid-fd
Browse files Browse the repository at this point in the history
lib: finish event_loop on invalid fd
  • Loading branch information
sahlberg authored Dec 7, 2024
2 parents 041f12d + 4580302 commit 6f2f785
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ event_loop(struct iscsi_context *iscsi, struct iscsi_sync_state *state)
state->status = -1;
return;
}

if (iscsi->fd < 0) {
iscsi_set_error(iscsi, "Invalid fd %d", iscsi->fd);
state->status = -1;
return;
}
}
}

Expand Down

0 comments on commit 6f2f785

Please sign in to comment.