Fixed disk io error - set fds to -1 when closing in hpws parent process (#254)

This commit is contained in:
Chalith Desaman
2021-02-23 12:23:55 +05:30
committed by GitHub
parent ff197a8bb6
commit 312713c296
3 changed files with 8 additions and 3 deletions

View File

@@ -287,7 +287,6 @@ namespace ledger::sqlite
if (sqlite3_prepare_v2(db, sql.data(), -1, &stmt, 0) == SQLITE_OK &&
stmt != NULL && sqlite3_step(stmt) == SQLITE_ROW)
{
// Finalize and distroys the statement.
ledger.seq_no = sqlite3_column_int64(stmt, 0);
ledger.time = sqlite3_column_int64(stmt, 1);
ledger.ledger_hash_hex = std::string((char *)sqlite3_column_text(stmt, 2));
@@ -300,6 +299,7 @@ namespace ledger::sqlite
ledger.output_hash_hex = std::string((char *)sqlite3_column_text(stmt, 9));
}
// Finalize and distroys the statement.
sqlite3_finalize(stmt);
return ledger;
}