8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:43:03 +01:00

Corrected fix for CORE-2842 - thanks to Vlad

This commit is contained in:
alexpeshkoff 2010-02-02 12:19:42 +00:00
parent bf04d99ca4
commit 9f0a189cbd

View File

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