8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Frontported fix for CORE-2842: Timeout with latchs in CCH does not work

This commit is contained in:
alexpeshkoff 2010-02-04 15:28:33 +00:00
parent 9610bcf063
commit 255f088785

View File

@ -4197,12 +4197,7 @@ static SSHORT latch_bdb(thread_db* tdbb,
{
//LATCH_MUTEX_RELEASE;
Database::Checkout dcoHolder(dbb);
if (latch_wait == 1) {
timeout_occurred = !(lwt->lwt_sem.tryEnter(120));
}
else {
lwt->lwt_sem.enter();
}
timeout_occurred = !(lwt->lwt_sem.tryEnter(latch_wait > 0 ? 120 : -latch_wait));
//LATCH_MUTEX_ACQUIRE;
}