From: Ian Jackson Date: Fri, 1 Jul 2016 11:19:59 +0000 (+0100) Subject: tcl daemons: if error occurs, ensure db is closed afterwards X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=318ea3dd952883ea67bf591851ba1717ad68de2f;p=people%2Fiwj%2Fosstest.git tcl daemons: if error occurs, ensure db is closed afterwards When an error occurs which we are not handling, we want to unconditionally close the db connection. The next transaction will reopen it. Signed-off-by: Ian Jackson --- diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 55ff885a..ab6760a3 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -334,6 +334,7 @@ proc transaction {tables script} { continue } } + catch { db-ensure-closed } } return -code $rc -errorinfo $ei -errorcode $ec $result }