changeset 46:ca0b8d4dcdb6 database-connection-manager

Fix
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 19:07:27 +0100
parents a59cdb8aaf31
children dd93c9ba6624
files m-toolbox/classes/@ltpda_uo/submit.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m-toolbox/classes/@ltpda_uo/submit.m	Tue Dec 06 19:07:22 2011 +0100
+++ b/m-toolbox/classes/@ltpda_uo/submit.m	Tue Dec 06 19:07:27 2011 +0100
@@ -286,7 +286,10 @@
 
   catch ex
     utils.helper.msg(msg.IMPORTANT, 'submission error. no object submitted')
-    c.close()
+    % close the connection if we own it
+    if isempty(find(pls, 'conn'))
+      c.close();
+    end
     rethrow(ex)
   end