From 1bbea4b87d61099c8022002bde4e2408c83510bb Mon Sep 17 00:00:00 2001 From: Joseph Wayne Norton Date: Tue, 25 Sep 2012 12:15:54 +0900 Subject: [PATCH] Fix case clause error. This is a fix for commit dce62a8 originally targeted for https://github.com/krestenkrab/hanoidb/issues/12 where an old file descriptor is used when storing 2i (transact data) causes the tx log to roll. --- src/hanoidb_nursery.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hanoidb_nursery.erl b/src/hanoidb_nursery.erl index 20e5ef7..1dc2856 100644 --- a/src/hanoidb_nursery.erl +++ b/src/hanoidb_nursery.erl @@ -269,7 +269,8 @@ ensure_space(Nursery, NeededRoom, Top) -> true -> Nursery; false -> - flush(Nursery, Top) + {ok, Nursery1} = flush(Nursery, Top), + Nursery1 end. transact(Spec, Nursery, Top) ->