]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
IndexedRelationsSearcherBase possible deadlock with semaphore 35/1535/2
authorjsimomaa <jani.simomaa@gmail.com>
Thu, 8 Mar 2018 07:56:08 +0000 (09:56 +0200)
committerJani Simomaa <jani.simomaa@semantum.fi>
Thu, 8 Mar 2018 07:56:27 +0000 (09:56 +0200)
refs #7805

Change-Id: I0a3e7d03b648d2b03b187baf171c0c95b4b7abb9

bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java

index c70650ede27bb92c86222654b22e2f039fd12d8a..71db7f6168ac525d69cf1356329f1af081068792 100644 (file)
@@ -698,10 +698,10 @@ abstract public class IndexedRelationsSearcherBase {
                                 }
                             }
                         }
                                 }
                             }
                         }
-
-                        s.release();
                     } catch (DatabaseException e) {
                         throw new IllegalStateException(e);
                     } catch (DatabaseException e) {
                         throw new IllegalStateException(e);
+                    } finally {
+                        s.release();
                     }
                 });
             }
                     }
                 });
             }