]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
tcl daemons: if error occurs, ensure db is closed afterwards
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 1 Jul 2016 11:19:59 +0000 (12:19 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Jul 2016 12:32:49 +0000 (13:32 +0100)
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 <Ian.Jackson@eu.citrix.com>
tcl/JobDB-Executive.tcl

index 55ff885abe7d565f71c0709d5f2fc29c93b2c9e9..ab6760a3216c2fbbea7c413afa960e456b868f36 100644 (file)
@@ -334,6 +334,7 @@ proc transaction {tables script} {
                    continue
                }
            }
+           catch { db-ensure-closed }
        }
        return -code $rc -errorinfo $ei -errorcode $ec $result
     }